summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/remove.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-24 16:46:41 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-24 16:46:41 +0000
commit131f2d8109a59df1ebbe587ff88c349583ada1a3 (patch)
treef663b4741235b97fd6c6dc3a3e26c668c9cca60e /usr.bin/cvs/remove.c
parenta225e84f8aeae052b61d147870070939fcfb20b0 (diff)
do not use `if (!var)' unless it's boolean, better use an == check;
ok jfb@ joris@.
Diffstat (limited to 'usr.bin/cvs/remove.c')
-rw-r--r--usr.bin/cvs/remove.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index ede76822c4a..7eb5198f7e7 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.22 2005/07/23 22:43:39 joris Exp $ */
+/* $OpenBSD: remove.c,v 1.23 2005/07/24 16:46:40 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2004, 2005 Xavier Santolaria <xsa@openbsd.org>
@@ -177,7 +177,8 @@ cvs_remove_local(CVSFILE *cf, void *arg)
cvs_log(LP_ERRNO, "%s", buf);
return (CVS_EX_DATA);
}
- if (!cvs_noexec && (unlink(buf) == -1) && (errno != ENOENT)) {
+ if ((cvs_noexec == 0) &&
+ (unlink(buf) == -1) && (errno != ENOENT)) {
cvs_log(LP_ERRNO, "cannot remove %s", buf);
return (CVS_EX_FILE);
}
@@ -226,7 +227,7 @@ static
int cvs_remove_file(const char *fpath)
{
/* if -f option is used, physically remove the file */
- if ((force_remove == 1) && !cvs_noexec) {
+ if ((force_remove == 1) && (cvs_noexec == 0)) {
if((unlink(fpath) == -1) && (errno != ENOENT)) {
cvs_log(LP_ERRNO, "unable to remove %s", fpath);
return (-1);