summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/util.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-27 19:24:15 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-27 19:24:15 +0000
commit3184c655b8f6643d96bbf0c8e31388c1c587fdfe (patch)
tree8cff1c0998cab4ab56d20a866f8807602efc679b /usr.bin/cvs/util.c
parent81638fab7d66be38a42c7378d3709437ef97b5a0 (diff)
check == -1 not != 0 for stat() return value, for consistency sake!
"OK big time" jfb@.
Diffstat (limited to 'usr.bin/cvs/util.c')
-rw-r--r--usr.bin/cvs/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index 0370aa70644..3664bb57ccd 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.46 2005/07/27 10:38:01 xsa Exp $ */
+/* $OpenBSD: util.c,v 1.47 2005/07/27 19:24:14 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -445,7 +445,7 @@ cvs_mkadmin(const char *dpath, const char *rootpath, const char *repopath)
if (l >= sizeof(path))
return (-1);
- if ((stat(path, &st) != 0) && (errno == ENOENT)) {
+ if ((stat(path, &st) == -1) && (errno == ENOENT)) {
fp = fopen(path, "w");
if (fp == NULL) {
cvs_log(LP_ERRNO, "failed to open %s", path);
@@ -460,7 +460,7 @@ cvs_mkadmin(const char *dpath, const char *rootpath, const char *repopath)
if (l >= sizeof(path))
return (-1);
- if ((stat(path, &st) != 0) && (errno == ENOENT)) {
+ if ((stat(path, &st) == -1) && (errno == ENOENT)) {
fp = fopen(path, "w");
if (fp == NULL) {
cvs_log(LP_ERRNO, "failed to open %s", path);