commit | f2eb8af1111d3e9f26cbc27d88d55bba1edd8b93 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Jul 14 12:22:40 2020 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Jul 14 12:22:40 2020 +0200 |
tree | 0491aae87899662bae53ca06d161d0f97628456f | |
parent | da85903aba00b351cf30645cc99a51e33fe28c7b [diff] [blame] |
parser BUGFIX fd error value
diff --git a/src/parser.c b/src/parser.c index ab0acd5..fe8528b 100644 --- a/src/parser.c +++ b/src/parser.c
@@ -187,7 +187,8 @@ } fd = open(fp, O_RDONLY); - LY_CHECK_ERR_RET(!fd, LOGERR(NULL, LY_ESYS, "Failed to open file \"%s\" (%s).", fp, strerror(errno)); free(fp), LY_ESYS); + LY_CHECK_ERR_RET(fd == -1, LOGERR(NULL, LY_ESYS, "Failed to open file \"%s\" (%s).", fp, strerror(errno)); free(fp), + LY_ESYS); LY_CHECK_ERR_RET(ret = ly_in_new_fd(fd, in), free(fp), ret);