fix config dump
[protos/libecoli.git] / lib / ecoli_keyval.c
index 164c8b4..12fe66b 100644 (file)
@@ -80,10 +80,8 @@ ec_keyval_lookup(const struct ec_keyval *keyval, const char *key)
 
        h = ec_murmurhash3(key, strlen(key), ec_keyval_seed);
        LIST_FOREACH(ref, &keyval->table[h & mask], next) {
-               if (strcmp(ref->elt->key, key) == 0) {
-                       errno = 0;
+               if (strcmp(ref->elt->key, key) == 0)
                        return ref;
-               }
        }
 
        errno = ENOENT;
@@ -404,6 +402,8 @@ static int ec_keyval_init_func(void)
        int fd;
        ssize_t ret;
 
+       return 0;//XXX for test reproduceability
+
        fd = open("/dev/urandom", 0);
        if (fd == -1) {
                fprintf(stderr, "failed to open /dev/urandom\n");