=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/Attic/child.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/rsync/Attic/child.c 2019/02/10 23:24:14 1.2 +++ src/usr.bin/rsync/Attic/child.c 2019/02/11 21:41:22 1.3 @@ -1,4 +1,4 @@ -/* $Id: child.c,v 1.2 2019/02/10 23:24:14 benno Exp $ */ +/* $Id: child.c,v 1.3 2019/02/11 21:41:22 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -44,7 +44,7 @@ /* Construct the remote shell command. */ - if (NULL == (args = fargs_cmdline(&sess, f))) { + if ((args = fargs_cmdline(&sess, f)) == NULL) { ERRX1(&sess, "fargs_cmdline"); exit(EXIT_FAILURE); } @@ -54,10 +54,10 @@ /* Make sure the child's stdin is from the sender. */ - if (-1 == dup2(fd, STDIN_FILENO)) { + if (dup2(fd, STDIN_FILENO) == -1) { ERR(&sess, "dup2"); exit(EXIT_FAILURE); - } if (-1 == dup2(fd, STDOUT_FILENO)) { + } if (dup2(fd, STDOUT_FILENO) == -1) { ERR(&sess, "dup2"); exit(EXIT_FAILURE); }