]> git.ipfire.org Git - thirdparty/util-linux.git/commit
include/cctype: fix string comparison
authorKarel Zak <kzak@redhat.com>
Wed, 2 Apr 2025 09:00:47 +0000 (11:00 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Apr 2025 08:14:59 +0000 (10:14 +0200)
commite6a7001bb539256cdd71e4f032c2842151814556
tree972585e0dfed554bda7bf85303f06b1873831fe6
parent798e4da071a96b14c7449bced9f16dc351dc5d84
include/cctype: fix string comparison

Reimplement c_strcasecmp() and c_strncasecmp() to be libc compatible
and fix c_strncasecmp() to avoid \0 misinterpretation. The original
implementation was pretty stupid (sorry).

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 259157b0c1a00806ff75188325e40ba10adf12ce)
include/cctype.h