coverity: fix various warnings detected with Coverity

These are (most likely) only warnings and not severe bugs.
Some of these changes are mostly made to get a clean run of
Coverity without any warnings.

Error found by running Coverity scan

https://bugzilla.redhat.com/show_bug.cgi?id=1025894

Co-Authored-By: Jiří Klimeš <jklimes@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2013-10-31 14:13:33 +01:00
parent ab92a0d69c
commit 97935382f4
40 changed files with 143 additions and 124 deletions

View File

@@ -131,7 +131,7 @@ nmc_parse_args (nmc_arg_t *arg_arr, gboolean last, int *argc, char ***argv, GErr
if (have_mandatory && !last)
return TRUE;
if (p && p->name)
if (p->name)
g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
_("Error: Argument '%s' was expected, but '%s' provided."), p->name, **argv);
else