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 *
|
static char *
|
||||||
get_module_name (const char *str)
|
get_module_name (const char *str)
|
||||||
{
|
{
|
||||||
char *base;
|
const char *base;
|
||||||
char *ext;
|
const char *ext;
|
||||||
|
|
||||||
base = strrchr (str, '/');
|
base = strrchr (str, '/');
|
||||||
if (! base)
|
if (! base)
|
||||||
base = (char *) str;
|
base = str;
|
||||||
else
|
else
|
||||||
base++;
|
base++;
|
||||||
|
|
||||||
@@ -164,9 +164,9 @@ get_module_name (const char *str)
|
|||||||
static char *
|
static char *
|
||||||
get_module_path (const char *prefix, const char *str)
|
get_module_path (const char *prefix, const char *str)
|
||||||
{
|
{
|
||||||
char *dir;
|
const char *dir;
|
||||||
char *base;
|
char *base;
|
||||||
char *ext;
|
const char *ext;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
|
||||||
ext = strrchr (str, '.');
|
ext = strrchr (str, '.');
|
||||||
|
|||||||
Reference in new issue
Block a user