mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
util/resolve: Save str[r]chr() ret val to const data ptr
With glibc-2.43 implementing the C23 standard, strrchr() and strchr() now return "const char *" when its first argument is "const char *". The fix is update all pointers receiving strrchr() and strchr()'s return values 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:
1 parent
9f4a586f12
commit
ce6f2b57f5
1 file changed
+5
-5
+5
-5
@@ -138,12 +138,12 @@ read_dep_list (FILE *fp)
|
||||
static char *
|
||||
get_module_name (const char *str)
|
||||
{
|
||||
char *base;
|
||||
char *ext;
|
||||
const char *base;
|
||||
const char *ext;
|
||||
|
||||
base = strrchr (str, '/');
|
||||
if (! base)
|
||||
base = (char *) str;
|
||||
base = str;
|
||||
else
|
||||
base++;
|
||||
|
||||
@@ -164,9 +164,9 @@ get_module_name (const char *str)
|
||||
static char *
|
||||
get_module_path (const char *prefix, const char *str)
|
||||
{
|
||||
char *dir;
|
||||
const char *dir;
|
||||
char *base;
|
||||
char *ext;
|
||||
const char *ext;
|
||||
char *ret;
|
||||
|
||||
ext = strrchr (str, '.');
|
||||
|
||||
Reference in new issue
Block a user