diff options
author | Jes Sorensen <jsorensen@fb.com> | 2017-05-11 22:40:16 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2017-05-11 22:40:16 +0200 |
commit | 9f3dd4549b2b904d343b79a8a7ba40c547e71d5d (patch) | |
tree | 3363f088f2605a16e1e6a4bb0337b29d082efd15 /Monitor.c | |
parent | retire the APIs that driver no longer supports (diff) | |
download | mdadm-9f3dd4549b2b904d343b79a8a7ba40c547e71d5d.tar.xz mdadm-9f3dd4549b2b904d343b79a8a7ba40c547e71d5d.zip |
Monitor: Not much point declaring mdlist in both forks of the if() statement
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Monitor.c')
-rw-r--r-- | Monitor.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -127,6 +127,7 @@ int Monitor(struct mddev_dev *devlist, struct mdstat_ent *mdstat = NULL; char *mailfrom = NULL; struct alert_info info; + struct mddev_ident *mdlist; if (!mailaddr) { mailaddr = conf_get_mailaddr(); @@ -162,7 +163,7 @@ int Monitor(struct mddev_dev *devlist, return 1; if (devlist == NULL) { - struct mddev_ident *mdlist = conf_get_ident(NULL); + mdlist = conf_get_ident(NULL); for (; mdlist; mdlist=mdlist->next) { struct state *st; if (mdlist->devname == NULL) @@ -189,8 +190,8 @@ int Monitor(struct mddev_dev *devlist, } else { struct mddev_dev *dv; for (dv=devlist ; dv; dv=dv->next) { - struct mddev_ident *mdlist = conf_get_ident(dv->devname); struct state *st = xcalloc(1, sizeof *st); + mdlist = conf_get_ident(dv->devname); st->devname = xstrdup(dv->devname); st->next = statelist; st->devnm[0] = 0; |