From b618f2c550894e57b228204153fe69cdc933c8f9 Mon Sep 17 00:00:00 2001 From: Marco Paland Date: Tue, 17 Apr 2018 17:55:32 +0200 Subject: cleanup(printf): don't use fixed size for long type --- printf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/printf.c b/printf.c index ec1f2ef..e5e3a36 100644 --- a/printf.c +++ b/printf.c @@ -425,9 +425,9 @@ static size_t _vsnprintf(char* buffer, size_t buffer_len, const char* format, va flags |= FLAGS_LONG_LONG; format++; } - if ((*format == 'z')) { - flags |= (sizeof(size_t) == 8 ? FLAGS_LONG_LONG : FLAGS_LONG); - format++; + if (*format == 'z') { + flags |= (sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; } // evaluate specifier -- cgit v1.2.3