summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2011-12-05 12:27:47 +0100
committerDan Williams <dcbw@redhat.com>2011-12-06 16:06:43 -0600
commit5b7503e95eb9d84935efea708b9dc326ef14d8ce (patch)
tree733311f3db53714ba4f4087a83f2bf0816d54ee5 /examples
parentc1344ec0976a46bf754c72b008278f9330e00796 (diff)
downloadNetworkManager-5b7503e95eb9d84935efea708b9dc326ef14d8ce.tar.gz
core: use nm_connection_get_setting_<type>() whenever possible
Leads to shorter, easier to read code and improves type casting safety. Signed-off-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/C/glib/list-connections-libnm-glib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/C/glib/list-connections-libnm-glib.c b/examples/C/glib/list-connections-libnm-glib.c
index edb5ccc34b..01a9f254e1 100644
--- a/examples/C/glib/list-connections-libnm-glib.c
+++ b/examples/C/glib/list-connections-libnm-glib.c
@@ -76,7 +76,7 @@ show_connection (NMConnection *data, gpointer user_data)
char timestamp_real_str[64];
const char *val1, *val2, *val3, *val4, *val5;
- s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ s_con = nm_connection_get_setting_connection (connection);
if (s_con) {
/* Get various info from NMSettingConnection and show it */
timestamp = nm_setting_connection_get_timestamp (s_con);