Skip to content

Commit

Permalink
Merge pull request #691 from openziti/check.uv_fs_open.better
Browse files Browse the repository at this point in the history
check for negative return values from uv_fs_open
  • Loading branch information
ekoby authored Jul 15, 2024
2 parents 3996e28 + 7fa2945 commit 9fa5162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ int load_file(const char *path, size_t pathlen, char **content, size_t *size) {
f = uv_fs_open(NULL, &fs_req, path, 0, O_RDONLY, NULL);
}

if (f == -1) {
if (f < 0) {
ZITI_LOG(ERROR, "%s - %s", path, strerror(errno));
return rc;
}
Expand Down

0 comments on commit 9fa5162

Please sign in to comment.