Fix a gcc warning on ubuntu lucid lynx.
authorAndre Noll <maan@systemlinux.org>
Thu, 22 Apr 2010 16:03:36 +0000 (18:03 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 22 Apr 2010 16:03:36 +0000 (18:03 +0200)
Apparently the Ubuntu guys know better than the programmer which
system calls require argument checking. Sad, sad, sad.

udp_send.c

index fc3bb2f5c5f657a45112cf2db3856407c8c0c611..e80670d0f3866dcde32114c0459a506b8cb78cff 100644 (file)
@@ -192,11 +192,13 @@ static void udp_shutdown_targets(void)
        size_t len = 0; /* STFU, gcc */
 
        list_for_each_entry_safe(ut, tmp, &targets, node) {
        size_t len = 0; /* STFU, gcc */
 
        list_for_each_entry_safe(ut, tmp, &targets, node) {
+               int ubuntu_glibc_headers_suck;
                if (ut->fd < 0)
                        continue;
                if (!buf)
                        len = vss_get_fec_eof_packet(&buf);
                if (ut->fd < 0)
                        continue;
                if (!buf)
                        len = vss_get_fec_eof_packet(&buf);
-               write(ut->fd, buf, len);
+               /* ignore return value, we're closing the target anyway. */
+               ubuntu_glibc_headers_suck = write(ut->fd, buf, len); /* STFU */
                udp_close_target(ut);
        }
 }
                udp_close_target(ut);
        }
 }