Execution cannot reach this statement: "while (devlist) { dv = de...".
Local variable "err" is assigned only once, to a constant value,
making it effectively constant throughout its scope.
Remove dead code.
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
struct md_list *dv;
struct dirent *ent;
DIR *dir;
- int err = 0;
#if DEBUG_LOOP
devlist = get_loop_devices();
dv->next = devlist;
devlist = dv;
}
- if (err) {
- while(devlist) {
- dv = devlist;
- devlist = devlist->next;
- free(dv->devname);
- free(dv);
- }
- }
closedir(dir);
return devlist;
}