summaryrefslogtreecommitdiff
path: root/upb/upb.c
diff options
context:
space:
mode:
Diffstat (limited to 'upb/upb.c')
-rw-r--r--upb/upb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/upb/upb.c b/upb/upb.c
index a3e07e4..3af9b75 100644
--- a/upb/upb.c
+++ b/upb/upb.c
@@ -142,7 +142,8 @@ bool upb_errno_is_wouldblock() {
bool upb_posix_codetostr(int code, char *buf, size_t len) {
if (strerror_r(code, buf, len) == -1) {
if (errno == EINVAL) {
- return snprintf(buf, len, "Invalid POSIX error number %d\n", code) >= len;
+ int n = snprintf(buf, len, "Invalid POSIX error number %d\n", code);
+ return n >= (int)len;
} else if (errno == ERANGE) {
return false;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback