mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Janitorial duty...
fix some undefined behaviour with increments in C. In theory a
compiler could have produced complete crap for this code. (tridge).
Jeremy.
(This used to be commit 2b4335f062
)
This commit is contained in:
parent
2b79854f06
commit
ff8ca2f88b
@ -1037,8 +1037,10 @@ void strlower_m(char *s)
|
||||
supported multi-byte character sets are ascii-compatible
|
||||
(ie. they match for the first 128 chars) */
|
||||
|
||||
while (*s && !(((unsigned char)s[0]) & 0x7F))
|
||||
*s++ = tolower((unsigned char)*s);
|
||||
while (*s && !(((unsigned char)s[0]) & 0x7F)) {
|
||||
*s = tolower((unsigned char)*s);
|
||||
s++;
|
||||
}
|
||||
|
||||
if (!*s)
|
||||
return;
|
||||
@ -1074,8 +1076,10 @@ void strupper_m(char *s)
|
||||
supported multi-byte character sets are ascii-compatible
|
||||
(ie. they match for the first 128 chars) */
|
||||
|
||||
while (*s && !(((unsigned char)s[0]) & 0x7F))
|
||||
*s++ = toupper((unsigned char)*s);
|
||||
while (*s && !(((unsigned char)s[0]) & 0x7F)) {
|
||||
*s = toupper((unsigned char)*s);
|
||||
s++;
|
||||
}
|
||||
|
||||
if (!*s)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user