From: Victor Julien Date: Fri, 11 Mar 2016 08:49:57 +0000 (+0100) Subject: daemon: suppress coverity resource leak warning (CID 400725) X-Git-Tag: suricata-3.0.1RC1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f17ef5e46b5fbcebf0027604a5b8f5fb8e5f2219;p=thirdparty%2Fsuricata.git daemon: suppress coverity resource leak warning (CID 400725) --- diff --git a/src/util-daemon.c b/src/util-daemon.c index 2eec7af13b..5aab8509e2 100644 --- a/src/util-daemon.c +++ b/src/util-daemon.c @@ -89,12 +89,9 @@ static void SetupLogging (void) int fd = open("/dev/null", O_RDWR); if (fd < 0) return; - if (dup2(fd, 0) < 0) - return; - if (dup2(fd, 1) < 0) - return; - if (dup2(fd, 2) < 0) - return; + (void)dup2(fd, 0); + (void)dup2(fd, 1); + (void)dup2(fd, 2); close(fd); }