diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-08 17:44:06 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-08 17:44:06 +0200 |
| commit | 8f7a3cbbdd0c0a48277c341dd3a8ec8743ae9735 (patch) | |
| tree | 4353551fcb59cc822c3cadf2f4888f70601e8fbf /src/settings/plugins/keyfile/nms-keyfile-connection.c | |
| parent | caf1db9d6fbc056cc6c76a24574890f6c7895f3d (diff) | |
New upstream version 1.13.90 upstream/1.13.90
Diffstat (limited to 'src/settings/plugins/keyfile/nms-keyfile-connection.c')
| -rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-connection.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/settings/plugins/keyfile/nms-keyfile-connection.c b/src/settings/plugins/keyfile/nms-keyfile-connection.c index 5f72a9fa..64e94b26 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-connection.c +++ b/src/settings/plugins/keyfile/nms-keyfile-connection.c @@ -75,9 +75,7 @@ commit_changes (NMSettingsConnection *connection, error)) return FALSE; - /* Update the filename if it changed */ - if ( path - && g_strcmp0 (path, nm_settings_connection_get_filename (connection)) != 0) { + if (!nm_streq0 (path, nm_settings_connection_get_filename (connection))) { gs_free char *old_path = g_strdup (nm_settings_connection_get_filename (connection)); nm_settings_connection_set_filename (connection, path); @@ -142,7 +140,7 @@ nms_keyfile_connection_new (NMConnection *source, if (!tmp) return NULL; - uuid = nm_connection_get_uuid (NM_CONNECTION (tmp)); + uuid = nm_connection_get_uuid (tmp); if (!uuid) { g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, "Connection in file %s had no UUID", full_path); @@ -154,9 +152,9 @@ nms_keyfile_connection_new (NMConnection *source, update_unsaved = FALSE; } - object = (GObject *) g_object_new (NMS_TYPE_KEYFILE_CONNECTION, - NM_SETTINGS_CONNECTION_FILENAME, full_path, - NULL); + object = g_object_new (NMS_TYPE_KEYFILE_CONNECTION, + NM_SETTINGS_CONNECTION_FILENAME, full_path, + NULL); /* Update our settings with what was read from the file */ if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (object), |