]> git.ipfire.org Git - pakfire.git/commitdiff
config: Fix return codes
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Aug 2022 10:27:29 +0000 (10:27 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Aug 2022 10:27:29 +0000 (10:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/config.c

index e36b48685d31ef7670eb4db9640f6b492b4b94fc..ac1e26d56be69fe4c9458d187cf08cdbfe29068f 100644 (file)
@@ -53,7 +53,7 @@ struct pakfire_config {
 int pakfire_config_create(struct pakfire_config** config) {
        struct pakfire_config* c = calloc(1, sizeof(*c));
        if (!c)
-               return ENOMEM;
+               return 1;
 
        // Initialize reference counter
        c->nrefs = 1;
@@ -162,7 +162,7 @@ int pakfire_config_set(struct pakfire_config* config,
        if (!entry) {
                entry = pakfire_config_create_entry(config, section, key);
                if (!entry)
-                       return ENOMEM;
+                       return 1;
        }
 
        // Store the value