From 1e204d768b50f2be244a1deccd9de87ae006cbac Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 7 Sep 2026 10:40:50 +0200 Subject: [PATCH] x86/boot: don't cast away const-ness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While the general C library strchr() has to do so, the early boot cmdline parsing has no such requirement. No functional change. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/boot/cmdline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c index 196c580e91..cf9e32b6d9 100644 --- a/xen/arch/x86/boot/cmdline.c +++ b/xen/arch/x86/boot/cmdline.c @@ -77,12 +77,12 @@ static int strncmp(const char *cs, const char *ct, size_t count) return 0; } -static char *strchr(const char *s, int c) +static const char *strchr(const char *s, int c) { for ( ; *s != (char)c; ++s ) if ( *s == '\0' ) return NULL; - return (char *)s; + return s; } static size_t strspn(const char *s, const char *accept)