fix(stream): coverity scan,type conversion
This commit is contained in:
parent
a484fa72c5
commit
2df86022c0
|
@ -19,12 +19,12 @@
|
|||
#include "taos.h"
|
||||
#include "taoserror.h"
|
||||
|
||||
#define UNIT_NUM_BITS 64
|
||||
#define UNIT_ADDR_NUM_BITS 6
|
||||
#define UNIT_NUM_BITS 64ULL
|
||||
#define UNIT_ADDR_NUM_BITS 6ULL
|
||||
|
||||
static FORCE_INLINE bool setBit(uint64_t *buf, uint64_t index) {
|
||||
uint64_t unitIndex = index >> UNIT_ADDR_NUM_BITS;
|
||||
uint64_t mask = 1 << (index % UNIT_NUM_BITS);
|
||||
uint64_t mask = 1ULL << (index % UNIT_NUM_BITS);
|
||||
uint64_t old = buf[unitIndex];
|
||||
buf[unitIndex] |= mask;
|
||||
return buf[unitIndex] != old;
|
||||
|
@ -32,7 +32,7 @@ static FORCE_INLINE bool setBit(uint64_t *buf, uint64_t index) {
|
|||
|
||||
static FORCE_INLINE bool getBit(uint64_t *buf, uint64_t index) {
|
||||
uint64_t unitIndex = index >> UNIT_ADDR_NUM_BITS;
|
||||
uint64_t mask = 1 << (index % UNIT_NUM_BITS);
|
||||
uint64_t mask = 1ULL << (index % UNIT_NUM_BITS);
|
||||
return buf[unitIndex] & mask;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue