mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 02:50:18 +01:00
libnm: make list of valid s390s options const
A const global variable is stored in immutable memory. You thus get a crash trying to modify it, which is desirable. The user is really not supposed to modify this buffer, even if nm_setting_wired_get_valid_s390_options() wrongly returns a non-const pointer.
This commit is contained in:
parent
ec6e9f0cac
commit
80c98b60da
1 changed files with 2 additions and 2 deletions
|
|
@ -74,7 +74,7 @@ G_DEFINE_TYPE(NMSettingWired, nm_setting_wired, NM_TYPE_SETTING)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static const char *valid_s390_opts[] = {
|
||||
static const char *const valid_s390_opts[] = {
|
||||
"bridge_role",
|
||||
"broadcast_mode",
|
||||
"buffer_count",
|
||||
|
|
@ -680,7 +680,7 @@ _nm_setting_wired_clear_s390_options(NMSettingWired *setting)
|
|||
const char **
|
||||
nm_setting_wired_get_valid_s390_options(NMSettingWired *setting)
|
||||
{
|
||||
return valid_s390_opts;
|
||||
return (const char **) valid_s390_opts;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue