diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2015-06-03 14:35:27 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2015-06-03 14:35:27 -0700 |
commit | 97eeb570225bb2f1060f4eff18ba664e129767d2 (patch) | |
tree | 6a2d282c3c7910263241e03f41be23c6a6cda710 /upb/upb.c | |
parent | 6650b3c6527c17965adf7239850857a10d56ba62 (diff) | |
parent | 919fea438a5ac5366684cfa26d2bb3d17519cb60 (diff) |
Merge pull request #27 from haberman/c89
Ported upb to C89, for greater portability.
Diffstat (limited to 'upb/upb.c')
-rw-r--r-- | upb/upb.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -20,10 +20,10 @@ bool upb_dumptostderr(void *closure, const upb_status* status) { return false; } -// Guarantee null-termination and provide ellipsis truncation. -// It may be tempting to "optimize" this by initializing these final -// four bytes up-front and then being careful never to overwrite them, -// this is safer and simpler. +/* Guarantee null-termination and provide ellipsis truncation. + * It may be tempting to "optimize" this by initializing these final + * four bytes up-front and then being careful never to overwrite them, + * this is safer and simpler. */ static void nullz(upb_status *status) { const char *ellipsis = "..."; size_t len = strlen(ellipsis); @@ -65,7 +65,7 @@ void upb_status_seterrf(upb_status *status, const char *fmt, ...) { void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args) { if (!status) return; status->ok_ = false; - vsnprintf(status->msg, sizeof(status->msg), fmt, args); + _upb_vsnprintf(status->msg, sizeof(status->msg), fmt, args); nullz(status); } |