Skip to content

Commit 0f6e266

Browse files
Removed unneeded else
1 parent de779cf commit 0f6e266

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/common/processing.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ void ffProcessAppendStdOut(FFstrbuf* buffer, char* const argv[])
1515
if(childPid == -1)
1616
return;
1717

18+
//Child
1819
if(childPid == 0)
1920
{
2021
dup2(pipes[1], STDOUT_FILENO);
@@ -24,11 +25,10 @@ void ffProcessAppendStdOut(FFstrbuf* buffer, char* const argv[])
2425
execvp(argv[0], argv);
2526
exit(901);
2627
}
27-
else
28-
{
29-
close(pipes[1]);
30-
waitpid(childPid, NULL, 0);
31-
ffAppendFDContent(pipes[0], buffer);
32-
close(pipes[0]);
33-
}
28+
29+
//Parent
30+
close(pipes[1]);
31+
waitpid(childPid, NULL, 0);
32+
ffAppendFDContent(pipes[0], buffer);
33+
close(pipes[0]);
3434
}

0 commit comments

Comments
 (0)