There's no need for condition of the following form:
if (str && STREQ(str, dst))
since we have STREQ_NULLABLE macro that handles NULL cases.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 0a17eff..74e695a 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -884,7 +884,7 @@ virConfSetValue(virConfPtr conf,
cur = conf->entries;
while (cur != NULL) {
- if ((cur->name != NULL) && (STREQ(cur->name, setting)))
+ if (STREQ_NULLABLE(cur->name, setting))
break;
prev = cur;
cur = cur->next;
--
2.0.4