pcap: Fix failure check on write() in pcapm()
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
3
pcap.c
3
pcap.c
@@ -118,7 +118,8 @@ void pcapm(struct msghdr *mh)
|
|||||||
|
|
||||||
if (write(pcap_fd, &h, sizeof(h)) < 0)
|
if (write(pcap_fd, &h, sizeof(h)) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
if (write(pcap_fd, (char *)iov->iov_base + 4, iov->iov_len - 4))
|
if (write(pcap_fd, (char *)iov->iov_base + 4,
|
||||||
|
iov->iov_len - 4) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user