summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-12 16:51:45 +0200
committerThomas Haller <thaller@redhat.com>2017-09-12 16:52:49 +0200
commit6ece7d6dd3505f627c4340cb79506da38ac29e67 (patch)
tree79d5c93878bbcac0ea1e25c405f420a2a05b4069
parenta8d2a4ebaf7e91a91fa046ff7927d45eca9c9801 (diff)
downloadNetworkManager-6ece7d6dd3505f627c4340cb79506da38ac29e67.tar.gz
cli: cleanup _get_fcn_gobject_int() and _set_fcn_gobject_int()
-rw-r--r--clients/common/nm-meta-setting-desc.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index 3535ac98c4..4a4eb13ab1 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -590,15 +590,12 @@ _get_fcn_gobject (ARGS_GET_FCN)
}
static gconstpointer
-_get_fcn_gobject_int_impl (const NMMetaPropertyInfo *property_info,
- NMSetting *setting,
- NMMetaAccessorGetType get_type,
- const NMMetaUtilsIntValueInfo *value_infos,
- gpointer *out_to_free)
+_get_fcn_gobject_int (ARGS_GET_FCN)
{
const GParamSpec *pspec;
nm_auto_unset_gvalue GValue gval = G_VALUE_INIT;
gint64 v;
+ const NMMetaUtilsIntValueInfo *value_infos;
RETURN_UNSUPPORTED_GET_TYPE ();
@@ -624,7 +621,8 @@ _get_fcn_gobject_int_impl (const NMMetaPropertyInfo *property_info,
}
if ( get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY
- && value_infos) {
+ && property_info->property_typ_data
+ && (value_infos = property_info->property_typ_data->subtype.gobject_int.value_infos)) {
for (; value_infos->nick; value_infos++) {
if (value_infos->value == v) {
RETURN_STR_TO_FREE (g_strdup_printf ("%lli (%s)",
@@ -638,16 +636,6 @@ _get_fcn_gobject_int_impl (const NMMetaPropertyInfo *property_info,
}
static gconstpointer
-_get_fcn_gobject_int (ARGS_GET_FCN)
-{
- return _get_fcn_gobject_int_impl (property_info, setting, get_type,
- property_info->property_typ_data
- ? property_info->property_typ_data->subtype.gobject_int.value_infos
- : NULL,
- out_to_free);
-}
-
-static gconstpointer
_get_fcn_gobject_mtu (ARGS_GET_FCN)
{
guint32 mtu;
@@ -851,10 +839,7 @@ _set_fcn_gobject_bool (ARGS_SET_FCN)
}
static gboolean
-_set_fcn_gobject_int_impl (const NMMetaPropertyInfo *property_info,
- NMSetting *setting,
- const char *value,
- GError **error)
+_set_fcn_gobject_int (ARGS_SET_FCN)
{
int errsv;
const GParamSpec *pspec;
@@ -975,12 +960,6 @@ _set_fcn_gobject_int_impl (const NMMetaPropertyInfo *property_info,
}
static gboolean
-_set_fcn_gobject_int (ARGS_SET_FCN)
-{
- return _set_fcn_gobject_int_impl (property_info, setting, value, error);
-}
-
-static gboolean
_set_fcn_gobject_mtu (ARGS_SET_FCN)
{
nm_auto_unset_gvalue GValue gval = G_VALUE_INIT;