Commit 3296409d authored by Baptiste Coudurier's avatar Baptiste Coudurier

fix open return check

Originally committed as revision 13858 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0679719d
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment