=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/wall/ttymsg.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- src/usr.bin/wall/ttymsg.c 2019/05/16 06:23:15 1.18 +++ src/usr.bin/wall/ttymsg.c 2019/06/28 13:35:05 1.19 @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymsg.c,v 1.18 2019/05/16 06:23:15 deraadt Exp $ */ +/* $OpenBSD: ttymsg.c,v 1.19 2019/06/28 13:35:05 deraadt Exp $ */ /* $NetBSD: ttymsg.c,v 1.3 1994/11/17 07:17:55 jtc Exp $ */ /* @@ -91,7 +91,7 @@ * open will fail on slip lines or exclusive-use lines * if not running as root; not an error. */ - if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { + if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) == -1) { if (errno == EBUSY || errno == EACCES) return (NULL); (void) snprintf(errbuf, sizeof(errbuf), @@ -100,7 +100,7 @@ } if (getuid()) { - if (fstat(fd, &st) < 0 || + if (fstat(fd, &st) == -1 || (st.st_mode & S_IWGRP) == 0) { close(fd); return (NULL); @@ -143,7 +143,7 @@ _exit(1); } cpid = fork(); - if (cpid < 0) { + if (cpid == -1) { (void) snprintf(errbuf, sizeof(errbuf), "fork: %s", strerror(errno)); (void) close(fd);