Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Oct 2011 14:03:18 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r226258 - user/gabor/grep/trunk/regex
Message-ID:  <201110111403.p9BE3IuC018528@svn.freebsd.org>

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



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