Skip to content
Snippets Groups Projects
Commit b2047af3 authored by Veniamin Gvozdikov's avatar Veniamin Gvozdikov Committed by Roman Tsisyk
Browse files

Fix #87: Incorrect type u_int32_t need change to uint32_t

parent d8175249
No related branches found
No related tags found
No related merge requests found
......@@ -46,12 +46,12 @@ A million repetitions of "a"
/* Hash a single 512-bit block. This is the core of the algorithm. */
void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64])
void SHA1Transform(uint32_t state[5], const unsigned char buffer[64])
{
u_int32_t a, b, c, d, e;
uint32_t a, b, c, d, e;
typedef union {
unsigned char c[64];
u_int32_t l[16];
uint32_t l[16];
} CHAR64LONG16;
#ifdef SHA1HANDSOFF
CHAR64LONG16 block[1]; /* use array to appear as a pointer */
......@@ -121,9 +121,9 @@ void SHA1Init(SHA1_CTX* context)
/* Run your data through this. */
void SHA1Update(SHA1_CTX* context, const unsigned char* data, u_int32_t len)
void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len)
{
u_int32_t i, j;
uint32_t i, j;
j = context->count[0];
if ((context->count[0] += len << 3) < j)
......@@ -161,7 +161,7 @@ void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
for (i = 0; i < 2; i++)
{
u_int32_t t = context->count[i];
uint32_t t = context->count[i];
int j;
for (j = 0; j < 4; t >>= 8, j++)
......
......@@ -9,14 +9,14 @@ By Steve Reid <steve@edmweb.com>
*/
typedef struct {
u_int32_t state[5];
u_int32_t count[2];
uint32_t state[5];
uint32_t count[2];
unsigned char buffer[64];
} SHA1_CTX;
void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64]);
void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
void SHA1Init(SHA1_CTX* context);
void SHA1Update(SHA1_CTX* context, const unsigned char* data, u_int32_t len);
void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len);
void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
#endif
......@@ -49,7 +49,7 @@ bool sse42_enabled_cpu();
* @pre true == cpu_has (cpuf_sse4_2)
* @return CRC32 value
*/
u_int32_t crc32c_hw(u_int32_t crc, const unsigned char *buf, unsigned int len);
uint32_t crc32c_hw(uint32_t crc, const unsigned char *buf, unsigned int len);
#endif
#endif /* TARANTOOL_CPU_FEATURES_H */
......
......@@ -35,7 +35,7 @@
extern "C" {
#endif /* defined(__cplusplus) */
typedef u_int32_t (*crc32_func)(u_int32_t crc, const unsigned char *buf, unsigned int len);
typedef uint32_t (*crc32_func)(uint32_t crc, const unsigned char *buf, unsigned int len);
/*
* Pointer to an architecture-specific implementation of
......
......@@ -51,8 +51,8 @@
#endif
static u_int32_t
crc32c_hw_byte(u_int32_t crc, unsigned char const *data, unsigned int length)
static uint32_t
crc32c_hw_byte(uint32_t crc, unsigned char const *data, unsigned int length)
{
while (length--) {
__asm__ __volatile__(
......@@ -67,8 +67,8 @@ crc32c_hw_byte(u_int32_t crc, unsigned char const *data, unsigned int length)
}
u_int32_t
crc32c_hw(u_int32_t crc, const unsigned char *buf, unsigned int len)
uint32_t
crc32c_hw(uint32_t crc, const unsigned char *buf, unsigned int len)
{
unsigned int iquotient = len / SCALE_F;
unsigned int iremainder = len % SCALE_F;
......
......@@ -42,12 +42,12 @@ extern "C" {
/*
* user could suggest pointer's storage himself
*/
typedef u_int32_t spnode_t;
typedef uint32_t spnode_t;
#define SPNIL (0xffffffff)
typedef struct sptree_node_pointers {
u_int32_t left; /* sizeof(spnode_t) >= sizeof(sptree_node_pointers.left) !!! */
u_int32_t right;
uint32_t left; /* sizeof(spnode_t) >= sizeof(sptree_node_pointers.left) !!! */
uint32_t right;
} sptree_node_pointers;
#define GET_SPNODE_LEFT(snp) ( (snp)->left )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment