From 0b6344fcc3d2a04f63e4b280b32046c36f193577 Mon Sep 17 00:00:00 2001 From: Felipe Martinez Date: Mon, 14 Oct 2024 23:18:44 +0000 Subject: [PATCH] Ignore write() return values --- src/pcap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pcap.c b/src/pcap.c index b5f5621..5adaa56 100644 --- a/src/pcap.c +++ b/src/pcap.c @@ -57,7 +57,7 @@ pcap_t *pcap_create(const char *path) .snaplen = 65535, .network = LINKTYPE_BLUETOOTH_LE_LL, }; - write(fd, &hdr, sizeof(hdr)); + (void)write(fd, &hdr, sizeof(hdr)); return pcap; } @@ -77,7 +77,7 @@ void pcap_write_packet(pcap_t *pcap, const uint8_t *data, size_t length) .orig_len = length, }; - write(pcap->fd, &hdr, sizeof(hdr)); - write(pcap->fd, data, length); + (void)write(pcap->fd, &hdr, sizeof(hdr)); + (void)write(pcap->fd, data, length); fsync(pcap->fd); }