From 3296409d5cbe124e367a3d7373a118faebbe8e8b Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sun, 22 Jun 2008 00:33:08 +0000 Subject: [PATCH] fix open return check Originally committed as revision 13858 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffserver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ffserver.c b/ffserver.c index 234820d513..b094217a7d 100644 --- a/ffserver.c +++ b/ffserver.c @@ -392,12 +392,12 @@ static void start_children(FFStream *feed) if (!ffserver_debug) { i = open("/dev/null", O_RDWR); - if (i) + if (i != -1) { dup2(i, 0); - dup2(i, 1); - dup2(i, 2); - if (i) + dup2(i, 1); + dup2(i, 2); close(i); + } } av_strlcpy(pathname, my_program_name, sizeof(pathname));