mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 03:30:09 +01:00
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:
parent
ac427b25fb
commit
9e70f31c8c
1 changed files with 3 additions and 3 deletions
|
|
@ -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, '=');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue