Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 20:12:59 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r306913 - stable/11/usr.bin/patch
Message-ID:  <201610092012.u99KCxDK094147@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610092012.u99KCxDK094147>