Skip to content

Commit 9f4a586

Browse files
nvinsonDaniel Kiper
authored andcommitted
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>
1 parent b71ae6d commit 9f4a586

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

util/probe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ char *
7070
grub_util_guess_bios_drive (const char *orig_path)
7171
{
7272
char *canon;
73-
char *ptr;
73+
const char *ptr;
7474
canon = grub_canonicalize_file_name (orig_path);
7575
if (!canon)
7676
return NULL;
@@ -99,7 +99,7 @@ char *
9999
grub_util_guess_efi_drive (const char *orig_path)
100100
{
101101
char *canon;
102-
char *ptr;
102+
const char *ptr;
103103
canon = grub_canonicalize_file_name (orig_path);
104104
if (!canon)
105105
return NULL;
@@ -128,7 +128,7 @@ char *
128128
grub_util_guess_baremetal_drive (const char *orig_path)
129129
{
130130
char *canon;
131-
char *ptr;
131+
const char *ptr;
132132
canon = grub_canonicalize_file_name (orig_path);
133133
if (!canon)
134134
return NULL;

0 commit comments

Comments
 (0)