Return errno for failing fopen in config_parse 01/242801/1
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 1 Sep 2020 02:12:49 +0000 (11:12 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 1 Sep 2020 02:15:16 +0000 (11:15 +0900)
Change-Id: I23c0e54128f59c9a3b3e533add1670cfb74bf9df
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/core/config-parser.c

index 02f07d0..68b9f76 100644 (file)
@@ -61,8 +61,8 @@ int config_parse(const char *file_name, int cb(struct parse_result *result,
        /* open conf file */
        f = fopen(file_name, "r");
        if (!f) {
+               ret = -errno;
                _E("Failed to open file '%s'.", file_name);
-               ret = -EIO;
                goto error;
        }