X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=udp_send.c;h=d55a9abf3e43355118f77d9c158311d730effcf9;hp=4fb10b444be321c51e7d33da2442fd6b8a469138;hb=d16fe3df649cb48d5ffa26187da3dad4c3066646;hpb=65542c43361ce4168f185b4c05835f5f5d09a043 diff --git a/udp_send.c b/udp_send.c index 4fb10b44..d55a9abf 100644 --- a/udp_send.c +++ b/udp_send.c @@ -9,12 +9,10 @@ #include #include -#include #include #include #include #include -#include #include "server.cmdline.h" #include "para.h" @@ -25,11 +23,11 @@ #include "server.h" #include "list.h" #include "send.h" +#include "sched.h" #include "vss.h" #include "portable_io.h" #include "net.h" #include "fd.h" -#include "sched.h" #include "close_on_fork.h" /** @@ -57,8 +55,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)