X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=udp_send.c;h=b4494eb7edb9e9fd26c1f4d20e9b81b06472c625;hp=4fb10b444be321c51e7d33da2442fd6b8a469138;hb=c387b216b5fd3c944053e1bba024815719e9a0d9;hpb=9417eae5ca2b9f10d25f769221e8fd91048bc68a diff --git a/udp_send.c b/udp_send.c index 4fb10b44..b4494eb7 100644 --- a/udp_send.c +++ b/udp_send.c @@ -57,8 +57,13 @@ static void udp_close_target(struct sender_client *sc) const char *buf; size_t len = vss_get_fec_eof_packet(&buf); - /* ignore return value, closing the target anyway. */ - (void)write(sc->fd, buf, len); + /* + * Ignore the return value of wirte() since we are closing the target + * anyway. The sole purpose of the "do_nothing" statement is to silence + * gcc. + */ + if (write(sc->fd, buf, len)) + do_nothing; } static void udp_delete_target(struct sender_client *sc, const char *msg)