diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-22 00:33:08 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-22 00:33:08 +0000 |
commit | 3296409d5cbe124e367a3d7373a118faebbe8e8b (patch) | |
tree | 576c6b3388e1dffc39a5a19774c22c0251054078 /ffserver.c | |
parent | 0679719d5bef64d1627473319aab2e25fb569ece (diff) | |
download | ffmpeg-3296409d5cbe124e367a3d7373a118faebbe8e8b.tar.gz |
fix open return check
Originally committed as revision 13858 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 8 |
1 files 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)); |