cli: make nmc_meta_environment_arg const pointer

Of course, we later pass the point on, where we need to cast the constness away
again. This is more a reminder that we aren't suppost to change the variable.
This commit is contained in:
Thomas Haller 2020-04-02 13:39:39 +02:00
parent 873f4795b2
commit 7627173c0e
4 changed files with 8 additions and 8 deletions

View file

@ -3842,7 +3842,7 @@ _meta_abstract_complete (const NMMetaAbstractInfo *abstract_info, const char *te
values = nm_meta_abstract_info_complete (abstract_info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
&ctx,
text,
NULL,
@ -4642,7 +4642,7 @@ complete_option (NmCli *nmc, const NMMetaAbstractInfo *abstract_info, const char
values = nm_meta_abstract_info_complete (abstract_info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
&ctx,
prefix,
&complete_filename,

View file

@ -456,7 +456,7 @@ const NMMetaEnvironment *const nmc_meta_environment = &((NMMetaEnvironment) {
.get_nm_connections = _env_get_nm_connections,
});
NmCli *const nmc_meta_environment_arg = &nm_cli;
const NmCli *const nmc_meta_environment_arg = &nm_cli;
static char *
get_property_val (NMSetting *setting, const char *prop, NMMetaAccessorGetType get_type, gboolean show_secrets, GError **error)
@ -475,7 +475,7 @@ get_property_val (NMSetting *setting, const char *prop, NMMetaAccessorGetType ge
value = property_info->property_type->get_fcn (property_info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
setting,
get_type,
show_secrets ? NM_META_ACCESSOR_GET_FLAGS_SHOW_SECRETS : 0,
@ -568,7 +568,7 @@ nmc_setting_set_property (NMClient *client,
g_object_freeze_notify (G_OBJECT (setting));
success = property_info->property_type->set_fcn (property_info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
setting,
modifier,
value,

View file

@ -1067,7 +1067,7 @@ _print_fill (const NmcConfig *nmc_config,
value = nm_meta_abstract_info_get (info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
target,
targets_data,
text_get_type,
@ -1112,7 +1112,7 @@ _print_fill (const NmcConfig *nmc_config,
cell->color = GPOINTER_TO_INT (nm_meta_abstract_info_get (info,
nmc_meta_environment,
nmc_meta_environment_arg,
(gpointer) nmc_meta_environment_arg,
target,
targets_data,
NM_META_ACCESSOR_GET_TYPE_COLOR,

View file

@ -66,7 +66,7 @@ void print_data (const NmcConfig *nmc_config,
/*****************************************************************************/
extern const NMMetaEnvironment *const nmc_meta_environment;
extern NmCli *const nmc_meta_environment_arg;
extern const NmCli *const nmc_meta_environment_arg;
typedef enum {