dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Weird code in r22153 (changes to strnatcmp.c)

Weird code in r22153 (changes to strnatcmp.c)

From: Al Le <>
Date: Wed, 12 Aug 2009 00:27:22 +0200


IMO the r22153 introduced a weirdly looking code:

static inline int
nat_toupper(int a)
     return tolower(a);

This makes the question arise (to a new code reader) as to why "tolower"
is called inside the function when the function itself is named

Besides, I don't quite understand why this change should fix the problem
mentioned in the commit message ("improper sorting of names with
underscores when Interpret numbers when sorting is used"). Should the
old code work correctly if toupper is implemented correctly? If the
commit really fixes something, shouldn't the real cause be fixed
(something in toupper IMO)?

Just some thoughts by a casual code reader.
Received on 2009-08-12

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy