Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2016 20:31:00 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306560 - head/usr.bin/patch
Message-ID:  <201610012031.u91KV09v098850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sat Oct  1 20:31:00 2016
New Revision: 306560
URL: https://svnweb.freebsd.org/changeset/base/306560

Log:
  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

Modified:
  head/usr.bin/patch/common.h

Modified: head/usr.bin/patch/common.h
==============================================================================
--- head/usr.bin/patch/common.h	Sat Oct  1 19:39:09 2016	(r306559)
+++ head/usr.bin/patch/common.h	Sat Oct  1 20:31:00 2016	(r306560)
@@ -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 */
 



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