[hackers] [sbase] Explicitly cast len to unsigned long for %lu || stateless

From: <git_AT_suckless.org>
Date: Tue, 02 Jul 2013 20:14:29 +0200

commit c1c367c1bd4e7a178afa4ebe73e46c17b5cc86cb
Author: stateless <stateless_AT_archlinux.us>
Date: Fri Jun 28 23:30:59 2013 +0100

    Explicitly cast len to unsigned long for %lu

diff --git a/cksum.c b/cksum.c
index efe241b..d08ca31 100644
--- a/cksum.c
+++ b/cksum.c
_AT_@ -100,7 +100,7 @@ cksum(int fd, const char *s)
         for(i = len; i > 0; i >>= 8)
                 ck = (ck << 8) ^ crctab[(ck >> 24) ^ (i & 0xFF)];
 
- printf("%u %lu", ~ck, len);
+ printf("%u %lu", ~ck, (unsigned long)len);
         if(s != NULL)
                 printf(" %s", s);
         putchar('
');
Received on Tue Jul 02 2013 - 20:14:29 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 02 2013 - 20:24:21 CEST