diff options
Diffstat (limited to 'tools/pktdumper.c')
-rw-r--r-- | tools/pktdumper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/pktdumper.c b/tools/pktdumper.c index ee60414060..ddb4b2b9fb 100644 --- a/tools/pktdumper.c +++ b/tools/pktdumper.c @@ -104,7 +104,11 @@ int main(int argc, char **argv) //printf("open(\"%s\")\n", pktfilename); if (!nowrite) { fd = open(pktfilename, O_WRONLY|O_CREAT, 0644); - write(fd, pkt.data, pkt.size); + err = write(fd, pkt.data, pkt.size); + if (err < 0) { + fprintf(stderr, "write: error %d\n", err); + return 1; + } close(fd); } av_free_packet(&pkt); |