util/probe: Save strrchr() ret val to const data ptr

With glibc-2.43 implementing the C23 standard, strrchr() now returns
"const char *" when its first argument is "const char *".

The fix is update all pointers receiving strrchr()'s return value so
that they are now "const char *" instead of "char *".

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Nicholas Vinson authored and Daniel Kiper committed 2026-02-26 15:54:04 +01:00
1 parent b71ae6db28
commit 9f4a586f12
1 file changed
+3 -3
+3 -3
View File
@@ -70,7 +70,7 @@ char *
grub_util_guess_bios_drive (const char *orig_path)
{
char *canon;
char *ptr;
const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
@@ -99,7 +99,7 @@ char *
grub_util_guess_efi_drive (const char *orig_path)
{
char *canon;
char *ptr;
const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
@@ -128,7 +128,7 @@ char *
grub_util_guess_baremetal_drive (const char *orig_path)
{
char *canon;
char *ptr;
const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;