svn commit: r306914 - stable/10/usr.bin/patch
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Oct 9 20:13:54 UTC 2016
Author: pfg
Date: Sun Oct 9 20:13:53 2016
New Revision: 306914
URL: https://svnweb.freebsd.org/changeset/base/306914
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/10/usr.bin/patch/common.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.bin/patch/common.h
==============================================================================
--- stable/10/usr.bin/patch/common.h Sun Oct 9 20:12:58 2016 (r306913)
+++ stable/10/usr.bin/patch/common.h Sun Oct 9 20:13:53 2016 (r306914)
@@ -53,10 +53,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-stable
mailing list