summaryrefslogtreecommitdiff
blob: 559d5d40272727b9231aa6ed6602bd5f16f0e0db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Index: crc32.c
===================================================================
--- src/crc32.c	(revision 735)
+++ src/crc32.c	(working copy)
@@ -70,11 +70,9 @@
 };
 
 
-unsigned long
-generate_crc32c(char *buffer, size_t length)
-{
-  unsigned int i;
-  unsigned long crc32 = ~0L;
+uint32_t generate_crc32c(char *buffer, size_t length) {
+  size_t i;
+  uint32_t crc32 = ~0L;
 
   for (i = 0; i < length; i++){
       CRC32C(crc32, (unsigned char)buffer[i]);
Index: crc32.h
===================================================================
--- src/crc32.h	(revision 735)
+++ src/crc32.h	(working copy)
@@ -2,7 +2,8 @@
 #define __crc32cr_table_h__
 
 #include <sys/types.h>
+#include <stdint.h>
 
-unsigned long generate_crc32c(char *string, size_t length);
+uint32_t generate_crc32c(char *string, size_t length);
 
 #endif