On Tue, Dec 09, 2014 at 04:52:14PM +0100, Michal Privoznik wrote:
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 <[email protected]> --- src/util/virconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ACK
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
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list
signature.asc
Description: Digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
