X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fsonar-icmp.c;h=6429035bade1f227c100d816644c2750057d8b0b;hp=8957c1924ea15b2f52756f2d90623107f5debcf9;hb=50be9bb40dc60130c99ffa568e6677779904ff70;hpb=5f1f12f2a37da634000f96d18d59cc73a8814ef7 diff --git a/hacks/glx/sonar-icmp.c b/hacks/glx/sonar-icmp.c index 8957c192..6429035b 100644 --- a/hacks/glx/sonar-icmp.c +++ b/hacks/glx/sonar-icmp.c @@ -366,7 +366,6 @@ read_hosts_file (sonar_sensor_data *ssd, const char *filename) /* Get the name and address */ - name = addr = 0; if ((addr = strtok(buf, " ,;\t\n"))) name = strtok(0, " ,;\t\n"); else @@ -614,7 +613,6 @@ send_ping (ping_data *pd, const sonar_bogie *b) ping_bogie *pb = (ping_bogie *) b->closure; u_char *packet; struct ICMP *icmph; - int result; const char *token = "org.jwz.xscreensaver.sonar"; int pcktsiz = (sizeof(struct ICMP) + sizeof(struct timeval) + @@ -653,8 +651,8 @@ send_ping (ping_data *pd, const sonar_bogie *b) /* Send it */ - if ((result = sendto(pd->icmpsock, packet, pcktsiz, 0, - &pb->address, sizeof(pb->address))) + if (sendto(pd->icmpsock, packet, pcktsiz, 0, + &pb->address, sizeof(pb->address)) != pcktsiz) { #if 0 @@ -1056,7 +1054,7 @@ parse_mode (sonar_sensor_data *ssd, char **error_ret, if (new) { sonar_bogie *nn = new; - while (nn && nn->next) + while (nn->next) nn = nn->next; nn->next = hostlist; hostlist = new;