aboutsummaryrefslogtreecommitdiff
path: root/string/strverscmp.c
diff options
context:
space:
mode:
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)
{