virConfSetValue: Simplify condition

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@redhat.com>
This commit is contained in:
Michal Privoznik 2014-12-09 14:48:54 +01:00
parent d85dcae4b2
commit 4523b7769d

View File

@ -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;