server: Simplify afs socket cookie code.
[paraslash.git] / udp_send.c
index 8c9eebc94c3a5ef684ef86340b70d3140cd6fcda..49c17631487db2cabedb4acd5444bb589d602762 100644 (file)
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file udp_send.c Para_server's udp sender. */
 
@@ -65,8 +61,9 @@ static void udp_close_target(struct sender_client *sc)
        PARA_NOTICE_LOG("sending FEC EOF\n");
        len = vss_get_fec_eof_packet(&buf);
        /* Ignore write() errors since we are closing the target anyway. */
-       if (write(sc->fd, buf, len) == len)
-               ut->sent_fec_eof = true;
+       if (write(sc->fd, buf, len))
+               do_nothing; /* avoid "ignoring return value" warning */
+       ut->sent_fec_eof = true;
 }
 
 static void udp_delete_target(struct sender_client *sc, const char *msg)