]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Fix "Dead assignments" as reported by llvm
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 12 Dec 2011 20:36:27 +0000 (18:36 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 12 Dec 2011 20:36:27 +0000 (18:36 -0200)
libkmod/libkmod-config.c
test/test-rmmod.c

index 0b5ac705bcb8faf339ed47c051301d413da87350..44fad72f3bf87a7731568aea15117d90d21f2ef3 100644 (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;
index 2f19006e3268c1f47f28440616d41d079ffe921b..493af803a0590ef628845541fe1539bec9446927 100644 (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);