equal
deleted
inserted
replaced
7 |
7 |
8 static inline uint32_t getbe32(const char *c) |
8 static inline uint32_t getbe32(const char *c) |
9 { |
9 { |
10 const unsigned char *d = (const unsigned char *)c; |
10 const unsigned char *d = (const unsigned char *)c; |
11 |
11 |
12 return ((d[0] << 24) | (d[1] << 16) | (d[2] << 8) | (d[3])); |
12 return ((((uint32_t)d[0]) << 24) | (((uint32_t)d[1]) << 16) | |
|
13 (((uint32_t)d[2]) << 8) | (d[3])); |
13 } |
14 } |
14 |
15 |
15 static inline int16_t getbeint16(const char *c) |
16 static inline int16_t getbeint16(const char *c) |
16 { |
17 { |
17 const unsigned char *d = (const unsigned char *)c; |
18 const unsigned char *d = (const unsigned char *)c; |