Sigh, today is not my day. Convert a verbose while() .. loop into a for()
loop. Submitted by: billf
This commit is contained in:
parent
a6b474b6c1
commit
a03884671d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65126
@ -63,11 +63,8 @@ upper(const char *str)
|
||||
|
||||
strncpy(buf, str, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
s = buf;
|
||||
while (*s) {
|
||||
for (s = buf; *s; s++)
|
||||
*s = toupper(*s);
|
||||
s++;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user