From: Michal Privoznik Date: Tue, 9 Dec 2014 13:48:54 +0000 (+0100) Subject: virConfSetValue: Simplify condition X-Git-Tag: v1.2.12-rc1~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4523b7769dc2baf91d63cd3cb2bf164e76825d78;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/util/virconf.c b/src/util/virconf.c index 0a17eff386..74e695a894 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;