From 4bcb2658ff02d72aa83640cf76ac65a430f17004 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Apr 2009 06:51:59 +0000 Subject: * string/strverscmp.c (__strverscmp): Fix last cleanups. * string/tst-svc.input: Add new test case. * string/tst-svc.expect: Adjust. * string/Makefile: Don't ignore tst-svc error. --- string/strverscmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'string/strverscmp.c') diff --git a/string/strverscmp.c b/string/strverscmp.c index 2b7ebcb8a8..7c5be8dd95 100644 --- a/string/strverscmp.c +++ b/string/strverscmp.c @@ -74,7 +74,7 @@ __strverscmp (s1, s2) unsigned char c1 = *p1++; unsigned char c2 = *p2++; /* Hint: '0' is a digit too. */ - int state = S_N | ((c1 == '0') + (isdigit (c1) != 0)); + int state = S_N + ((c1 == '0') + (isdigit (c1) != 0)); int diff; while ((diff = c1 - c2) == 0) @@ -85,10 +85,10 @@ __strverscmp (s1, s2) state = next_state[state]; c1 = *p1++; c2 = *p2++; - state |= (c1 == '0') + (isdigit (c1) != 0); + state += (c1 == '0') + (isdigit (c1) != 0); } - state = result_type[state * 3 | (((c2 == '0') + (isdigit (c2) != 0)))]; + state = result_type[state * 3 + (((c2 == '0') + (isdigit (c2) != 0)))]; switch (state) { -- cgit v1.2.3