aboutsummaryrefslogtreecommitdiff
path: root/src/nat/gnunet-helper-nat-client.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-16 18:45:19 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-16 18:45:19 +0000
commit2804cb0a19730b3d4acc1d10f9ef591d890e7684 (patch)
tree71b82800a800f08bdfc42d722e275c01e5d9e5c5 /src/nat/gnunet-helper-nat-client.c
parent1f85e67c62031b79d7f9607f0ac4bcd1a5a04704 (diff)
downloadgnunet-2804cb0a19730b3d4acc1d10f9ef591d890e7684.tar.gz
gnunet-2804cb0a19730b3d4acc1d10f9ef591d890e7684.zip
-cast returns from close to void to indicate that we intentionally ignore them, close socket on new error paths
Diffstat (limited to 'src/nat/gnunet-helper-nat-client.c')
-rw-r--r--src/nat/gnunet-helper-nat-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c
index f30348cc4..579090fe2 100644
--- a/src/nat/gnunet-helper-nat-client.c
+++ b/src/nat/gnunet-helper-nat-client.c
@@ -427,14 +427,14 @@ make_raw_socket ()
427 setsockopt (ret, SOL_SOCKET, SO_BROADCAST, (char *) &one, sizeof (one))) 427 setsockopt (ret, SOL_SOCKET, SO_BROADCAST, (char *) &one, sizeof (one)))
428 { 428 {
429 fprintf (stderr, "setsockopt failed: %s\n", strerror (errno)); 429 fprintf (stderr, "setsockopt failed: %s\n", strerror (errno));
430 close (ret); 430 (void) close (ret);
431 return -1; 431 return -1;
432 } 432 }
433 if (0 != 433 if (0 !=
434 setsockopt (ret, IPPROTO_IP, IP_HDRINCL, (char *) &one, sizeof (one))) 434 setsockopt (ret, IPPROTO_IP, IP_HDRINCL, (char *) &one, sizeof (one)))
435 { 435 {
436 fprintf (stderr, "setsockopt failed: %s\n", strerror (errno)); 436 fprintf (stderr, "setsockopt failed: %s\n", strerror (errno));
437 close (ret); 437 (void) close (ret);
438 return -1; 438 return -1;
439 } 439 }
440 return ret; 440 return ret;
@@ -490,7 +490,7 @@ main (int argc, char *const *argv)
490#endif 490#endif
491 send_icmp (&external, &target); 491 send_icmp (&external, &target);
492 send_icmp_udp (&external, &target); 492 send_icmp_udp (&external, &target);
493 close (rawsock); 493 (void) close (rawsock);
494 return 0; 494 return 0;
495} 495}
496 496