Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 20:13:53 +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-10@freebsd.org
Subject:   svn commit: r306914 - stable/10/usr.bin/patch
Message-ID:  <201610092013.u99KDrE2094226@repo.freebsd.org>

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



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