]> sourceware.org Git - lvm2.git/commitdiff
Replace test for NULL of root->child with test for NULL l
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 25 Sep 2011 19:41:27 +0000 (19:41 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 25 Sep 2011 19:41:27 +0000 (19:41 +0000)
It's 100% equivalent test - since it always happen for the first iteration.
But the check for 'l' is understandable with analyzers - since analyzer
is not smart enough to deduce connection between  root->child == NULL.

libdm/libdm-config.c

index 20944c98a19957ec431520fab2493e3c27b000da..975fc96c86587bb9ae0de6221def9cc8e7f2214b 100644 (file)
@@ -557,7 +557,7 @@ static struct dm_config_node *_section(struct parser *p)
                        if (!(n = _section(p)))
                                return_NULL;
 
-                       if (!root->child)
+                       if (!l)
                                root->child = n;
                        else
                                l->sib = n;
This page took 0.032688 seconds and 5 git commands to generate.