=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/diff.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- src/usr.bin/rcs/diff.c 2016/10/16 13:35:51 1.39 +++ src/usr.bin/rcs/diff.c 2019/06/28 13:35:03 1.40 @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.39 2016/10/16 13:35:51 okan Exp $ */ +/* $OpenBSD: diff.c,v 1.40 2019/06/28 13:35:03 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -327,12 +327,12 @@ goto closem; } - if (fstat(fileno(f1), &stb1) < 0) { + if (fstat(fileno(f1), &stb1) == -1) { warn("%s", file1); goto closem; } - if (fstat(fileno(f2), &stb2) < 0) { + if (fstat(fileno(f2), &stb2) == -1) { warn("%s", file2); goto closem; } @@ -849,7 +849,7 @@ ssize_t nr; line = xmalloc(rlen + 1); - if ((nr = pread(fd, line, rlen, off)) < 0) + if ((nr = pread(fd, line, rlen, off)) == -1) err(D_ERROR, "preadline"); line[nr] = '\0'; return (line);