=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cu/command.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/cu/command.c 2019/03/22 07:03:23 1.17 +++ src/usr.bin/cu/command.c 2019/06/28 13:35:00 1.18 @@ -1,4 +1,4 @@ -/* $OpenBSD: command.c,v 1.17 2019/03/22 07:03:23 nicm Exp $ */ +/* $OpenBSD: command.c,v 1.18 2019/06/28 13:35:00 deraadt Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott @@ -60,7 +60,7 @@ cu_err(1, "fork"); case 0: fd = open(_PATH_DEVNULL, O_RDWR); - if (fd < 0 || dup2(fd, STDIN_FILENO) == -1) + if (fd == -1 || dup2(fd, STDIN_FILENO) == -1) _exit(1); close(fd);