projects
/
NetworkManager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df9ac19
)
libnm-util: remove unneeded check for non-null after dereferencing pointer
author
Thomas Haller
<thaller@redhat.com>
Sun, 6 Mar 2016 16:06:50 +0000
(17:06 +0100)
committer
Thomas Haller
<thaller@redhat.com>
Sun, 6 Mar 2016 16:06:50 +0000
(17:06 +0100)
Since commit
01b9b4104c365002fae5e45b564956062fe146d4
, we assume
that @error is properly set. No need to check for non-null.
Found by coverity.
libnm-util/nm-utils.c
patch
|
blob
|
history
diff --git
a/libnm-util/nm-utils.c
b/libnm-util/nm-utils.c
index
24f233f
..
084f0f5
100644
(file)
--- a/
libnm-util/nm-utils.c
+++ b/
libnm-util/nm-utils.c
@@
-1515,15
+1515,13
@@
nm_utils_uuid_generate_from_string (const char *s)
if (!nm_utils_init (&error)) {
g_warning ("error initializing crypto: %s", error->message);
- if (error)
- g_error_free (error);
+ g_error_free (error);
return NULL;
}
if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (uuid), &error)) {
g_warning ("error generating UUID: %s", error->message);
- if (error)
- g_error_free (error);
+ g_error_free (error);
return NULL;
}