summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-11-06 01:36:59 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-11-23 23:33:06 +0800
commitda8b580d51ba688ae9c15ebe779b83a9f6a8da30 (patch)
tree0fb1bc75eb1991888e2473070acce351dc803628
parentf6e993b94bc9b21342decf41865c7e4c81fada1e (diff)
downloadmupdf-da8b580d51ba688ae9c15ebe779b83a9f6a8da30.tar.xz
fz_vsnprintf() can simply use bitwidth of given types.
-rw-r--r--source/fitz/printf.c10
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)