mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
Merge pull request #3433 from ThomasWaldmann/fix-cpp-macros
add parens for C preprocessor macro argument usages
This commit is contained in:
commit
50e1759460
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ static uint32_t table_base[] =
|
||||||
0xc5ae37bb, 0xa76ce12a, 0x8150d8f3, 0x2ec29218, 0xa35f0984, 0x48c0647e, 0x0b5ff98c, 0x71893f7b
|
0xc5ae37bb, 0xa76ce12a, 0x8150d8f3, 0x2ec29218, 0xa35f0984, 0x48c0647e, 0x0b5ff98c, 0x71893f7b
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BARREL_SHIFT(v, shift) ( ((v) << shift) | ((v) >> ((32 - shift) & 0x1f)) )
|
#define BARREL_SHIFT(v, shift) ( ((v) << (shift)) | ((v) >> ((32 - (shift)) & 0x1f)) )
|
||||||
|
|
||||||
size_t pagemask;
|
size_t pagemask;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ static int hash_sizes[] = {
|
||||||
#define EMPTY _htole32(0xffffffff)
|
#define EMPTY _htole32(0xffffffff)
|
||||||
#define DELETED _htole32(0xfffffffe)
|
#define DELETED _htole32(0xfffffffe)
|
||||||
|
|
||||||
#define BUCKET_ADDR(index, idx) (index->buckets + (idx * index->bucket_size))
|
#define BUCKET_ADDR(index, idx) (index->buckets + ((idx) * index->bucket_size))
|
||||||
|
|
||||||
#define BUCKET_MATCHES_KEY(index, idx, key) (memcmp(key, BUCKET_ADDR(index, idx), index->key_size) == 0)
|
#define BUCKET_MATCHES_KEY(index, idx, key) (memcmp(key, BUCKET_ADDR(index, idx), index->key_size) == 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue