svn commit: r226258 - user/gabor/grep/trunk/regex

Gabor Kovesdan gabor at FreeBSD.org
Tue Oct 11 14:03:19 UTC 2011


Author: gabor
Date: Tue Oct 11 14:03:18 2011
New Revision: 226258
URL: http://svn.freebsd.org/changeset/base/226258

Log:
  - Fix shift values on all architectures
  
  Submitted by:	delphij

Modified:
  user/gabor/grep/trunk/regex/tre-fastmatch.c

Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c
==============================================================================
--- user/gabor/grep/trunk/regex/tre-fastmatch.c	Tue Oct 11 13:56:37 2011	(r226257)
+++ user/gabor/grep/trunk/regex/tre-fastmatch.c	Tue Oct 11 14:03:18 2011	(r226258)
@@ -161,7 +161,7 @@ static int	fastcmp(const fastmatch_t *fg
       shift = bc;							\
     else								\
       {									\
-	ts = ((long)u - v < 0) ? 0 : (u - v);				\
+	ts = (u >= v) ? (u - v) : 0;					\
 	shift = MAX(ts, bc);						\
 	shift = MAX(shift, gs);						\
 	if (shift == gs)						\


More information about the svn-src-user mailing list