Re: [PATCH] scanner.c: prefer strchr() over for loop and toupper() in place
I personally find the current code more readable.
[PATCH] scanner.c: prefer strchr() over for loop and toupper() in place
uppercase_dup() was copying SRC to DST and converting DST to uppercase. Now it converts to uppercase while copying. find_enumeration() was calling strlen() on the whole string before checking for the '.' character in a loop. Now it uses strchr(). --- src/scanner.c | 19 +++ 1