summaryrefslogtreecommitdiff
path: root/upb/upb.c
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-12-22 12:15:45 -0800
committerJoshua Haberman <jhaberman@gmail.com>2011-12-22 12:15:45 -0800
commit1b9b6bd1ad2d862a7df86096e96991135f0fb92c (patch)
treeb1023a383c22b4ce52e33d114da8cbe1bffcbd79 /upb/upb.c
parent1bcab1377de6afe8c0f9c895cdba04baacf3e4a5 (diff)
Fixed the open-source build.
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