summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-24 17:48:06 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-24 17:48:06 +0000
commitaefcbb5f5f2e784591e902df439b77b275bc56c1 (patch)
tree27cc83579fb9f2815bf2a32b5c4d9311f8c7b9cc /usr.bin
parente2f4883a97ae601d6dc87bc5324d0627fef73db8 (diff)
some more `if (!var)' cleanup;
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/checkout.c8
-rw-r--r--usr.bin/cvs/cvs.c4
-rw-r--r--usr.bin/cvs/remove.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index a4969e768f1..a205f5e4b6c 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.37 2005/07/08 08:54:43 joris Exp $ */
+/* $OpenBSD: checkout.c,v 1.38 2005/07/24 17:48:05 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -157,7 +157,7 @@ cvs_checkout_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg)
co_mods = argv;
co_nmod = argc;
- if (!statmod && (argc == 0)) {
+ if ((statmod == 0) && (argc == 0)) {
cvs_log(LP_ABORT,
"must specify at least one module or directory");
return (-1);
@@ -231,7 +231,7 @@ cvs_checkout_pre_exec(struct cvsroot *root)
if (cvs_sendreq(root, CVS_REQ_XPANDMOD, NULL) < 0)
cvs_log(LP_ERR, "failed to expand module");
- if (usehead && (cvs_sendarg(root, "-f", 0) < 0))
+ if ((usehead == 1) && (cvs_sendarg(root, "-f", 0) < 0))
return (CVS_EX_PROTO);
if ((tgtdir != NULL) &&
@@ -239,7 +239,7 @@ cvs_checkout_pre_exec(struct cvsroot *root)
(cvs_sendarg(root, tgtdir, 0) < 0)))
return (CVS_EX_PROTO);
- if (!shorten && cvs_sendarg(root, "-N", 0) < 0)
+ if ((shorten == 0) && cvs_sendarg(root, "-N", 0) < 0)
return (CVS_EX_PROTO);
if ((cvs_cmd_checkout.cmd_flags & CVS_CMD_PRUNEDIRS) &&
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index da9f7cb6a56..fe1910de224 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.73 2005/07/23 11:19:46 joris Exp $ */
+/* $OpenBSD: cvs.c,v 1.74 2005/07/24 17:48:05 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -131,7 +131,7 @@ main(int argc, char **argv)
}
cvs_command = argv[0];
- if (cvs_readrc) {
+ if (cvs_readrc == 1) {
cvs_read_rcfile();
if (cvs_defargs != NULL) {
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index 3e72ca6062b..42d1c0c3850 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.24 2005/07/24 17:20:14 xsa Exp $ */
+/* $OpenBSD: remove.c,v 1.25 2005/07/24 17:48:05 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2004, 2005 Xavier Santolaria <xsa@openbsd.org>
@@ -159,7 +159,7 @@ cvs_remove_local(CVSFILE *cf, void *arg)
return (CVS_EX_FILE);
}
- if (!nuked) {
+ if (nuked == 0) {
existing++;
if (verbosity > 1)
cvs_log(LP_WARN, "file `%s' still in working directory",
@@ -196,7 +196,7 @@ cvs_remove_local(CVSFILE *cf, void *arg)
removed++;
}
- if (removed) {
+ if (removed != 0) {
if (verbosity > 0)
cvs_log(LP_INFO, "use '%s commit' to remove %s "
"permanently", __progname,
@@ -204,7 +204,7 @@ cvs_remove_local(CVSFILE *cf, void *arg)
return (0);
}
- if (existing) {
+ if (existing != 0) {
cvs_log(LP_WARN, ((existing == 1) ?
"%d file exists; remove it first" :
"%d files exist; remove them first"), existing);