summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/config.c b/config.c
index 4437de7..2feaae3 100644
--- a/config.c
+++ b/config.c
@@ -216,6 +216,7 @@ int devline(char *line)
}
mddev_uuid_t uuidlist = NULL;
+mddev_uuid_t *uidlp = &uuidlist;
void arrayline(char *line)
{
@@ -254,8 +255,9 @@ void arrayline(char *line)
mu = malloc(sizeof(*mu));
mu->devname = strdup(dev);
memcpy(mu->uuid, uuid, sizeof(uuid));
- mu->next = uuidlist;
- uuidlist = mu;
+ mu->next = NULL;
+ *uidlp = mu;
+ uidlp = &mu->next;
}
}