]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: test-strnum - fix format size mismatch
authorPhil Carmody <phil@dovecot.fi>
Tue, 16 Sep 2014 11:03:52 +0000 (14:03 +0300)
committerPhil Carmody <phil@dovecot.fi>
Tue, 16 Sep 2014 11:03:52 +0000 (14:03 +0300)
Signed-off-by: Phil Carmody <phil@dovecot.fi>
src/lib/test-strnum.c

index 074d23dac21f3e67c717a14e3ed945a945b39978..221340ed42edcdffd6762d7deca7fb98bc2d8a57 100644 (file)
@@ -17,7 +17,7 @@ static int crappy_uintmax_to_str(char *into, uintmax_t val)
        if(val >= BIGBASE) {
                len = crappy_uintmax_to_str(into, val/BIGBASE);
        }
-       i_snprintf(into + len, 10, "%09lu", val % BIGBASE);
+       i_snprintf(into + len, 10, "%09lu", (unsigned long)(val % BIGBASE));
        return len + strlen(STRINGIFY2(BIGBASE))-2;
 #undef STRINGIFY2
 #undef STRINGIFY