Skip to content

Commit

Permalink
[fix] Correct the dup2() calls in the client process.
Browse files Browse the repository at this point in the history
I don't know these got swapped, but whatever.  Likely due to the fact
that I can never remember the order of the parameters for dup2().  Fix
them.

Signed-off-by: David Cantrell <dcantrell@redhat.com>
  • Loading branch information
dcantrell committed Apr 13, 2023
1 parent aaae82b commit 4ec0e4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/inspect_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ static char *rpm_prep_source(struct rpminspect *ri, const rpmfile_entry_t *file,
}

/* connect the output */
ocode = dup2(STDOUT_FILENO, pfd[STDOUT_FILENO]);
ecode = dup2(STDERR_FILENO, pfd[STDOUT_FILENO]);
ocode = dup2(pfd[STDOUT_FILENO], STDOUT_FILENO);
ecode = dup2(pfd[STDOUT_FILENO], STDERR_FILENO);

if (ocode == -1 || ecode == -1) {
warn("dup2");
Expand Down

0 comments on commit 4ec0e4c

Please sign in to comment.