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 --- xmalloc.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'xmalloc.c') diff --git a/xmalloc.c b/xmalloc.c index d5805b8..02d6ce4 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -141,11 +141,3 @@ char *xstrndup(const char *str, size_t size) return cp; } - -int xdup(int fd) -{ - int ret = dup(fd); - if (unlikely(ret < 0)) - panic("xdup: dup failed\n"); - return ret; -} -- cgit v1.2.3-54-g00ecf