summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-10-09 20:12:58 +0000
committerpfg <pfg@FreeBSD.org>2016-10-09 20:12:58 +0000
commitae15d6ead64228cd025e008b05eecf9f26c71a93 (patch)
tree20deb2cb49d9c7c88d73a7bd271c4af526b49f54 /usr.bin
parentdd0ffa43a048719e3fb76d3604733fa58a102c65 (diff)
downloadFreeBSD-src-ae15d6ead64228cd025e008b05eecf9f26c71a93.zip
FreeBSD-src-ae15d6ead64228cd025e008b05eecf9f26c71a93.tar.gz
MFC r306560, r306561:
patch(1): make some macros look boolean. Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/patch/common.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/patch/common.h b/usr.bin/patch/common.h
index 2cdeaff..1e69ee9 100644
--- a/usr.bin/patch/common.h
+++ b/usr.bin/patch/common.h
@@ -47,10 +47,9 @@
/* handy definitions */
-#define strNE(s1,s2) (strcmp(s1, s2))
-#define strEQ(s1,s2) (!strcmp(s1, s2))
-#define strnNE(s1,s2,l) (strncmp(s1, s2, l))
-#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l))
+#define strEQ(s1,s2) (strcmp(s1, s2) == 0)
+#define strnNE(s1,s2,l) (strncmp(s1, s2, l) != 0)
+#define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0)
/* typedefs */
OpenPOWER on IntegriCloud