summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-07-24 16:46:39 +0000
committerxsa <xsa@openbsd.org>2005-07-24 16:46:39 +0000
commit93c08a06a85f8c4835ed0cc9653fdcc4576f0934 (patch)
treeffa6bb04b3a26e14eaa8a66a2acf56561c7a478b
parentBe more permissive when checking the interrupt vector for devices tied to (diff)
downloadwireguard-openbsd-93c08a06a85f8c4835ed0cc9653fdcc4576f0934.tar.xz
wireguard-openbsd-93c08a06a85f8c4835ed0cc9653fdcc4576f0934.zip
do not use `if (!var)' unless it's boolean, better use an == check;
ok jfb@ joris@.
-rw-r--r--usr.bin/cvs/entries.c4
-rw-r--r--usr.bin/cvs/proto.c14
-rw-r--r--usr.bin/cvs/remove.c7
-rw-r--r--usr.bin/cvs/resp.c4
-rw-r--r--usr.bin/cvs/tag.c4
5 files changed, 19 insertions, 14 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c
index 8164b64af32..1d9a9e71fde 100644
--- a/usr.bin/cvs/entries.c
+++ b/usr.bin/cvs/entries.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: entries.c,v 1.40 2005/07/21 11:42:24 xsa Exp $ */
+/* $OpenBSD: entries.c,v 1.41 2005/07/24 16:46:39 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -168,7 +168,7 @@ cvs_ent_close(CVSENTRIES *ep)
{
struct cvs_ent *ent;
- if (!cvs_noexec && (ep->cef_flags & CVS_ENTF_WR) &&
+ if ((cvs_noexec == 0) && (ep->cef_flags & CVS_ENTF_WR) &&
!(ep->cef_flags & CVS_ENTF_SYNC)) {
/* implicit sync with disk */
(void)cvs_ent_write(ep);
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c
index 24cbae6f22d..af3c3640255 100644
--- a/usr.bin/cvs/proto.c
+++ b/usr.bin/cvs/proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proto.c,v 1.65 2005/07/23 11:20:49 joris Exp $ */
+/* $OpenBSD: proto.c,v 1.66 2005/07/24 16:46:40 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -323,13 +323,17 @@ cvs_connect(struct cvsroot *root)
(cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-Q") < 0))
return (-1);
- if (cvs_noexec && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-n") < 0))
+ if ((cvs_noexec == 1) &&
+ (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-n") < 0))
return (-1);
- if (cvs_nolog && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-l") < 0))
+ if ((cvs_nolog == 1) &&
+ (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-l") < 0))
return (-1);
- if (cvs_readonly && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-r") < 0))
+ if ((cvs_readonly == 1) &&
+ (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-r") < 0))
return (-1);
- if (cvs_trace && (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-t") < 0))
+ if ((cvs_trace == 1) &&
+ (cvs_sendreq(root, CVS_REQ_GLOBALOPT, "-t") < 0))
return (-1);
/* not sure why, but we have to send this */
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);
diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c
index ed645865c54..afd6cc3f505 100644
--- a/usr.bin/cvs/resp.c
+++ b/usr.bin/cvs/resp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resp.c,v 1.47 2005/07/23 11:19:46 joris Exp $ */
+/* $OpenBSD: resp.c,v 1.48 2005/07/24 16:46:40 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -366,7 +366,7 @@ cvs_resp_statdir(struct cvsroot *root, int type, char *line)
return (-1);
}
- if (!cvs_noexec) {
+ if (cvs_noexec == 0) {
if ((type == CVS_RESP_CLRSTATDIR) &&
(unlink(statpath) == -1) && (errno != ENOENT)) {
cvs_log(LP_ERRNO, "failed to unlink %s file",
diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c
index 3fd936e0405..17cb1091a42 100644
--- a/usr.bin/cvs/tag.c
+++ b/usr.bin/cvs/tag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tag.c,v 1.26 2005/07/18 07:22:23 xsa Exp $ */
+/* $OpenBSD: tag.c,v 1.27 2005/07/24 16:46:40 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2004 Joris Vink <joris@openbsd.org>
@@ -275,7 +275,7 @@ cvs_tag_local(CVSFILE *cf, void *arg)
return (CVS_EX_DATA);
}
- if (!cvs_noexec) {
+ if (cvs_noexec == 0) {
if (rcs_sym_add(rf, tag_name, tag_rev) < 0) {
cvs_log(LP_ERR, "failed to tag %s: %s", rcspath,
rcs_errstr(rcs_errno));