diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-11-06 01:36:59 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-11-23 23:33:06 +0800 |
commit | da8b580d51ba688ae9c15ebe779b83a9f6a8da30 (patch) | |
tree | 0fb1bc75eb1991888e2473070acce351dc803628 /source | |
parent | f6e993b94bc9b21342decf41865c7e4c81fada1e (diff) | |
download | mupdf-da8b580d51ba688ae9c15ebe779b83a9f6a8da30.tar.xz |
fz_vsnprintf() can simply use bitwidth of given types.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/printf.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/fitz/printf.c b/source/fitz/printf.c index 718af4a4..3c75afbe 100644 --- a/source/fitz/printf.c +++ b/source/fitz/printf.c @@ -198,16 +198,10 @@ fz_vsnprintf(char *buffer, size_t space, const char *fmt, va_list args) } break; case 'z': - if (sizeof(size_t) >= 8) - length = 64; - else - length = 32; + length = sizeof(size_t) * 8; break; case 'Z': - if (sizeof(fz_off_t) >= 8) - length = 64; - else - length = 32; + length = sizeof(fz_off_t) * 8; break; } if (length != 0) |