Commit c66a84b8bf for qemu.org
commit c66a84b8bf383a42fde8062958fb4ec414abb736
Author: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Date: Fri Mar 27 15:43:56 2026 +0200
hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
(1) QEMU always runs with the C locale so there's not an actual
behaviour change here
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-11-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 170795ad6a..f4a26a85b5 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -129,7 +129,7 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,
return;
}
for (i = 0; i < cap->possible->num; i++) {
- if (!strcasecmp(val, cap->possible->vals[i])) {
+ if (!g_ascii_strcasecmp(val, cap->possible->vals[i])) {
spapr->cmd_line_caps[cap->index] = true;
spapr->eff.caps[cap->index] = i;
return;