mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-12-01 00:48:18 +00:00
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Jones <pjones@redhat.com>
|
||
|
Date: Mon, 20 Jul 2020 12:24:02 -0400
|
||
|
Subject: [PATCH] Fix const char ** pointers in grub-core/commands/blscfg.c
|
||
|
|
||
|
This will need to get folded back in the right place on the next rebase,
|
||
|
but it's before "Make grub_strtol() "end" pointers have safer const
|
||
|
qualifiers" currently, so for now I'm leaving it here instead of merging
|
||
|
it back with the original patch.
|
||
|
|
||
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||
|
---
|
||
|
grub-core/commands/blscfg.c | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
||
|
index 4ec6504d9a4..e907a6a5d28 100644
|
||
|
--- a/grub-core/commands/blscfg.c
|
||
|
+++ b/grub-core/commands/blscfg.c
|
||
|
@@ -612,7 +612,7 @@ static char **bls_make_list (struct bls_entry *entry, const char *key, int *num)
|
||
|
return list;
|
||
|
}
|
||
|
|
||
|
-static char *field_append(bool is_var, char *buffer, char *start, char *end)
|
||
|
+static char *field_append(bool is_var, char *buffer, const char *start, const char *end)
|
||
|
{
|
||
|
char *tmp = grub_strndup(start, end - start + 1);
|
||
|
const char *field = tmp;
|
||
|
@@ -641,11 +641,11 @@ static char *field_append(bool is_var, char *buffer, char *start, char *end)
|
||
|
return buffer;
|
||
|
}
|
||
|
|
||
|
-static char *expand_val(char *value)
|
||
|
+static char *expand_val(const char *value)
|
||
|
{
|
||
|
char *buffer = NULL;
|
||
|
- char *start = value;
|
||
|
- char *end = value;
|
||
|
+ const char *start = value;
|
||
|
+ const char *end = value;
|
||
|
bool is_var = false;
|
||
|
|
||
|
if (!value)
|