diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-12-22 12:15:45 -0800 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-12-22 12:15:45 -0800 |
commit | 1b9b6bd1ad2d862a7df86096e96991135f0fb92c (patch) | |
tree | b1023a383c22b4ce52e33d114da8cbe1bffcbd79 /upb/upb.c | |
parent | 1bcab1377de6afe8c0f9c895cdba04baacf3e4a5 (diff) |
Fixed the open-source build.
Diffstat (limited to 'upb/upb.c')
-rw-r--r-- | upb/upb.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |