]> sourceware.org Git - lvm2.git/commitdiff
cleanup: declare vars before code
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 22 Oct 2015 08:33:01 +0000 (10:33 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 22 Oct 2015 20:46:10 +0000 (22:46 +0200)
libdm/libdm-config.c

index b2082c865af7663872f010b6608069994d0be749..c8984b203542a575d9f95498a6df04b40607c1e3 100644 (file)
@@ -157,21 +157,18 @@ struct dm_config_tree *dm_config_insert_cascaded_tree(struct dm_config_tree *fir
 
 static struct dm_config_node *_config_reverse(struct dm_config_node *head)
 {
-       if (!head)
-               return NULL;
-
        struct dm_config_node *left = head, *middle = NULL, *right = NULL;
 
-       do {
+       while (left) {
                right = middle;
                middle = left;
                left = left->sib;
                middle->sib = right;
                middle->child = _config_reverse(middle->child);
-       } while (left);
+       }
 
        return middle;
-};
+}
 
 int dm_config_parse(struct dm_config_tree *cft, const char *start, const char *end)
 {
This page took 0.042463 seconds and 5 git commands to generate.