aboutsummaryrefslogtreecommitdiff
path: root/string/strverscmp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-07 06:51:59 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-07 06:51:59 +0000
commit4bcb2658ff02d72aa83640cf76ac65a430f17004 (patch)
treec16826690adfb652fd633f88fc8782585f1cd7ea /string/strverscmp.c
parent322e23db2402ceb66d7f7e5f59d07965382f298a (diff)
downloadglibc-4bcb2658ff02d72aa83640cf76ac65a430f17004.zip
glibc-4bcb2658ff02d72aa83640cf76ac65a430f17004.tar.gz
glibc-4bcb2658ff02d72aa83640cf76ac65a430f17004.tar.bz2
* string/strverscmp.c (__strverscmp): Fix last cleanups.cvs/fedora-glibc-20090407T0657
* string/tst-svc.input: Add new test case. * string/tst-svc.expect: Adjust. * string/Makefile: Don't ignore tst-svc error.
Diffstat (limited to 'string/strverscmp.c')
-rw-r--r--string/strverscmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string/strverscmp.c b/string/strverscmp.c
index 2b7ebcb..7c5be8d 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)
{