Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for negative return values from uv_fs_open #691

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
time_t t = ts.tv_sec;
struct tm *tm = gmtime(&t);

snprintf(log_timestamp, sizeof(log_timestamp), "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",

Check warning on line 417 in library/utils.c

View workflow job for this annotation

GitHub Actions / Linux ARM

':' directive output may be truncated writing 1 byte into a region of size between 0 and 16 [-Wformat-truncation=]

Check warning on line 417 in library/utils.c

View workflow job for this annotation

GitHub Actions / Linux ARM64

':' directive output may be truncated writing 1 byte into a region of size between 0 and 16 [-Wformat-truncation=]

Check warning on line 417 in library/utils.c

View workflow job for this annotation

GitHub Actions / Linux x86_64

':' directive output may be truncated writing 1 byte into a region of size between 0 and 16 [-Wformat-truncation=]
1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, ts.tv_usec / 1000
);
Expand Down Expand Up @@ -648,7 +648,7 @@
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
Loading