1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

* 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.
This commit is contained in:
Ulrich Drepper
2009-04-07 06:51:59 +00:00
parent 322e23db24
commit 4bcb2658ff
6 changed files with 14 additions and 5 deletions

View File

@ -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)
{