initrd: remove const qualifier from temporary variable

`argument` is not const, but `tmp` is. We use `tmp`
for reading arguments one by one, but we cannot add
a null byte to separate the key and value if it is const.

Make it non-const, so that `val[0] = '\0';` does not fail.
This commit is contained in:
Jan Vaclav 2025-12-02 15:03:28 +01:00
parent ac427b25fb
commit 9e70f31c8c

View file

@ -1177,7 +1177,7 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames)
{
const char *nettype;
const char *subchannels[4] = {0, 0, 0, 0};
const char *tmp;
char *tmp;
gs_free char *ifname = NULL;
gs_free char *str_subchannels = NULL;
const char *prefix;
@ -1248,7 +1248,7 @@ reader_parse_rd_znet(Reader *reader, char *argument, gboolean net_ifnames)
NULL);
while ((tmp = get_word(&argument, ',')) != NULL) {
const char *key;
char *key;
char *val;
val = strchr(tmp, '=');