aboutgitcodebugslistschat
path: root/pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pcap.c b/pcap.c
index 46cc4b0..e6b5ced 100644
--- a/pcap.c
+++ b/pcap.c
@@ -86,9 +86,8 @@ static void pcap_frame(const struct iovec *iov, size_t iovcnt,
.caplen = l2len,
.len = l2len
};
- struct iovec hiov = { &h, sizeof(h) };
- if (write_remainder(pcap_fd, &hiov, 1, 0) < 0 ||
+ if (write_all_buf(pcap_fd, &h, sizeof(h)) < 0 ||
write_remainder(pcap_fd, iov, iovcnt, offset) < 0)
debug_perror("Cannot log packet, length %zu", l2len);
}