pcap: Silence warnings about fwrite(3) return value being ignored.
authorAndrew Evans <aevans@nicira.com>
Tue, 12 Apr 2011 17:40:15 +0000 (10:40 -0700)
committerAndrew Evans <aevans@nicira.com>
Tue, 12 Apr 2011 17:40:15 +0000 (10:40 -0700)
lib/pcap.c

index afd41fa814c08d4f6752563e7decd8db8b7c3b65..9c95c4092ad984b8b47a80860c1347b7e22447a6 100644 (file)
@@ -100,7 +100,7 @@ pcap_write_header(FILE *file)
     ph.sigfigs = 0;
     ph.snaplen = 1518;
     ph.network = 1;             /* Ethernet */
-    fwrite(&ph, sizeof ph, 1, file);
+    ignore(fwrite(&ph, sizeof ph, 1, file));
 }
 
 int
@@ -159,6 +159,6 @@ pcap_write(FILE *file, struct ofpbuf *buf)
     prh.ts_usec = 0;
     prh.incl_len = buf->size;
     prh.orig_len = buf->size;
-    fwrite(&prh, sizeof prh, 1, file);
-    fwrite(buf->data, buf->size, 1, file);
+    ignore(fwrite(&prh, sizeof prh, 1, file));
+    ignore(fwrite(buf->data, buf->size, 1, file));
 }