Fix check for opened indexes
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 14:29:13 +0000 (12:29 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 14:29:13 +0000 (12:29 -0200)
libkmod/libkmod.c

index 87c9a3d..b519b90 100644 (file)
@@ -691,7 +691,7 @@ KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx)
        for (i = 0; i < ARRAY_SIZE(index_files); i++) {
                char path[PATH_MAX];
 
-               if (ctx->indexes[i] == NULL) {
+               if (ctx->indexes[i] != NULL) {
                        INFO(ctx, "Index %s already loaded\n", index_files[i]);
                        continue;
                }