From dfb45a7ac75d17c3a8421bfb53840d6db271a121 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Wed, 12 Jun 2013 14:33:43 +0200 Subject: ioops: misc: add dup{,2}_or_die to ioops Bail out if it should ever fail. Detected by coverty in the translate_pcap_to_txf() path. Signed-off-by: Daniel Borkmann --- ioops.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ioops.h') diff --git a/ioops.h b/ioops.h index 6de6c62..8e12448 100644 --- a/ioops.h +++ b/ioops.h @@ -5,6 +5,8 @@ extern int open_or_die(const char *file, int flags); extern int open_or_die_m(const char *file, int flags, mode_t mode); +extern int dup_or_die(int oldfd); +extern void dup2_or_die(int oldfd, int newfd); extern void create_or_die(const char *file, mode_t mode); extern int tun_open_or_die(char *name, int type); extern void pipe_or_die(int pipefd[2], int flags); -- cgit v1.2.3-54-g00ecf