]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: config: Use better return codes
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 11:54:29 +0000 (11:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jul 2023 12:58:49 +0000 (12:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/config.c

index e1699af87e0bfdb2d04f95fae0b3c2ad75c862d9..327b2605f33c6d7afa6b0906941e014802a36efe 100644 (file)
@@ -441,8 +441,7 @@ int pakfire_config_read(struct pakfire_config* config, FILE* f) {
                if (isspace(*line)) {
                        // We cannot assign this value anywhere
                        if (!*key) {
-                               errno = EINVAL;
-                               r = 1;
+                               r = -EINVAL;
                                goto ERROR;
                        }