example: avoid gcc -Wstringop-overread for strnlen

This commit is contained in:
Nigel Tao committed 2023-04-29 11:59:07 +10:00
1 parent d36277f0c0
commit 57b80f8c2e
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1432,7 +1432,7 @@ compute_exit_code(const char* status_msg) {
n = strnlen(status_msg, 2047);
if (n >= 2047) {
status_msg = "main: internal error: error message is too long";
n = strnlen(status_msg, 2047);
n = strlen(status_msg);
}
}
const int stderr_fd = 2;