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>
Kostiantyn Kostiuk committed
Mar 27, 2026 at 15:43 UTC
c66a84b8bf383a42fde8062958fb4ec414abb736
1 file changed
+1
-1
hw/ppc/spapr_caps.c
+1
-1
@@ -129,7 +129,7 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,
129
return;
130
}
131
for (i = 0; i < cap->possible->num; i++) {
132
- if (!strcasecmp(val, cap->possible->vals[i])) {
132
+ if (!g_ascii_strcasecmp(val, cap->possible->vals[i])) {
133
spapr->cmd_line_caps[cap->index] = true;
134
spapr->eff.caps[cap->index] = i;
135
return;