diff options
author | Thomas Haller <thaller@redhat.com> | 2014-04-15 16:54:38 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-05-02 15:20:30 +0200 |
commit | 9ef23947cc8f074767bd63b984b73740766377b0 (patch) | |
tree | 7bd002b553b5922a63eec86d4faa13f45c0402e7 /tui | |
parent | 981e33b83b57377d04fa6caa50a4434c59fb9285 (diff) | |
download | NetworkManager-9ef23947cc8f074767bd63b984b73740766377b0.tar.gz |
all: fix various warnings detected with coverity
https://bugzilla.gnome.org/show_bug.cgi?id=728320
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'tui')
-rw-r--r-- | tui/nm-editor-utils.c | 5 | ||||
-rw-r--r-- | tui/nmtui.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tui/nm-editor-utils.c b/tui/nm-editor-utils.c index 7989eac84b..4ac0eb6413 100644 --- a/tui/nm-editor-utils.c +++ b/tui/nm-editor-utils.c @@ -349,7 +349,10 @@ nm_editor_utils_create_connection (GType type, slave_setting_type = types[i]->slave_setting_type; } - g_return_val_if_fail (type_data != NULL, NULL); + if (!type_data) { + g_return_val_if_reached (NULL); + return NULL; + } connection = nm_connection_new (); diff --git a/tui/nmtui.c b/tui/nmtui.c index c1c3ef5def..7fcac445a2 100644 --- a/tui/nmtui.c +++ b/tui/nmtui.c @@ -255,6 +255,7 @@ main (int argc, char **argv) nm_settings = nm_remote_settings_new (NULL); g_signal_connect (nm_settings, NM_REMOTE_SETTINGS_CONNECTIONS_READ, G_CALLBACK (connections_read), &got_connections); + /* coverity[loop_condition] */ while (!got_connections) g_main_context_iteration (NULL, TRUE); |