=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/wc/wc.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- src/usr.bin/wc/wc.c 2018/09/30 12:44:22 1.25 +++ src/usr.bin/wc/wc.c 2019/06/28 13:35:05 1.26 @@ -1,4 +1,4 @@ -/* $OpenBSD: wc.c,v 1.25 2018/09/30 12:44:22 schwarze Exp $ */ +/* $OpenBSD: wc.c,v 1.26 2019/06/28 13:35:05 deraadt Exp $ */ /* * Copyright (c) 1980, 1987, 1991, 1993 @@ -132,7 +132,7 @@ linect = wordct = charct = 0; stream = NULL; if (file) { - if ((fd = open(file, O_RDONLY, 0)) < 0) { + if ((fd = open(file, O_RDONLY, 0)) == -1) { warn("%s", file); rval = 1; return;