[hackers] [sbase] Use PRIu32 and avoid cast || FRIGN
commit a4d9b7b11e61cd34d9c6e900118976ed94d61472
Author: FRIGN <dev_AT_frign.de>
Date: Sat Feb 1 20:14:25 2014 +0000
Use PRIu32 and avoid cast
diff --git a/cksum.c b/cksum.c
index 25f7274..e762e85 100644
--- a/cksum.c
+++ b/cksum.c
_AT_@ -1,5 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
_AT_@ -106,7 +107,7 @@ cksum(FILE *fp, const char *s)
for(i = len; i > 0; i >>= 8)
ck = (ck << 8) ^ crctab[(ck >> 24) ^ (i & 0xFF)];
- printf("%lu %lu", (unsigned long)~ck, (unsigned long)len);
+ printf("%"PRIu32" %lu", ~ck, (unsigned long)len);
if(s != NULL)
printf(" %s", s);
putchar('
');
Received on Sat Feb 01 2014 - 21:16:36 CET
This archive was generated by hypermail 2.3.0
: Sat Feb 01 2014 - 21:24:16 CET