From 70597ceb15cecf9617659aab173616ebbe34ec5d Mon Sep 17 00:00:00 2001 From: pfg Date: Sat, 1 Oct 2016 20:31:00 +0000 Subject: [PATCH] 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/ MFC after: 1 week --- usr.bin/patch/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/patch/common.h b/usr.bin/patch/common.h index 2cdeaffc7618..5533115bb791 100644 --- a/usr.bin/patch/common.h +++ b/usr.bin/patch/common.h @@ -48,9 +48,9 @@ /* handy definitions */ #define strNE(s1,s2) (strcmp(s1, s2)) -#define strEQ(s1,s2) (!strcmp(s1, s2)) +#define strEQ(s1,s2) (strcmp(s1, s2) == 0) #define strnNE(s1,s2,l) (strncmp(s1, s2, l)) -#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l)) +#define strnEQ(s1,s2,l) (strncmp(s1, s2, l) == 0) /* typedefs */