svn commit: r306913 - stable/11/usr.bin/patch
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Oct 9 20:13:00 UTC 2016
Author: pfg
Date: Sun Oct 9 20:12:58 2016
New Revision: 306913
URL: https://svnweb.freebsd.org/changeset/base/306913
Log:
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/
Modified:
stable/11/usr.bin/patch/common.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.bin/patch/common.h
==============================================================================
--- stable/11/usr.bin/patch/common.h Sun Oct 9 20:07:01 2016 (r306912)
+++ stable/11/usr.bin/patch/common.h Sun Oct 9 20:12:58 2016 (r306913)
@@ -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 */
More information about the svn-src-all
mailing list