Fix "Dead assignments" as reported by llvm

This commit is contained in:
Lucas De Marchi 2011-12-12 18:36:27 -02:00
parent 973c80ba7c
commit 1c250ec150
2 changed files with 2 additions and 4 deletions

View File

@ -402,15 +402,14 @@ static DIR *conf_files_list(struct kmod_ctx *ctx, struct kmod_list **list,
DIR *d;
int err;
*list = NULL;
d = opendir(path);
if (d == NULL) {
err = errno;
ERR(ctx, "%m\n");
return NULL;
}
*list = NULL;
for (;;) {
struct dirent ent, *entp;
struct kmod_list *l, *tmp;

View File

@ -32,7 +32,6 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
err = 0;
kmod_list_foreach(itr, list) {
struct kmod_module *mod = kmod_module_get_module(itr);
const char *name = kmod_module_get_name(mod);