1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

cleanup: declare vars before code

This commit is contained in:
Zdenek Kabelac 2015-10-22 10:33:01 +02:00
parent 2af696c32f
commit 39cffa4e9b

View 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) 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; struct dm_config_node *left = head, *middle = NULL, *right = NULL;
do { while (left) {
right = middle; right = middle;
middle = left; middle = left;
left = left->sib; left = left->sib;
middle->sib = right; middle->sib = right;
middle->child = _config_reverse(middle->child); middle->child = _config_reverse(middle->child);
} while (left); }
return middle; return middle;
}; }
int dm_config_parse(struct dm_config_tree *cft, const char *start, const char *end) int dm_config_parse(struct dm_config_tree *cft, const char *start, const char *end)
{ {