* of fast-path lock slots.
*/
#define FAST_PATH_SLOT(group, index) \
- (AssertMacro(((group) >= 0) && ((group) < FastPathLockGroupsPerBackend)), \
- AssertMacro(((index) >= 0) && ((index) < FP_LOCK_SLOTS_PER_GROUP)), \
+ (AssertMacro((uint32) (group) < FastPathLockGroupsPerBackend), \
+ AssertMacro((uint32) (index) < FP_LOCK_SLOTS_PER_GROUP), \
((group) * FP_LOCK_SLOTS_PER_GROUP + (index)))
/*
* the FAST_PATH_SLOT macro, split it into group and index (in the group).
*/
#define FAST_PATH_GROUP(index) \
- (AssertMacro(((index) >= 0) && ((index) < FP_LOCK_SLOTS_PER_BACKEND)), \
+ (AssertMacro((uint32) (index) < FP_LOCK_SLOTS_PER_BACKEND), \
((index) / FP_LOCK_SLOTS_PER_GROUP))
#define FAST_PATH_INDEX(index) \
- (AssertMacro(((index) >= 0) && ((index) < FP_LOCK_SLOTS_PER_BACKEND)), \
+ (AssertMacro((uint32) (index) < FP_LOCK_SLOTS_PER_BACKEND), \
((index) % FP_LOCK_SLOTS_PER_GROUP))
/* Macros for manipulating proc->fpLockBits */
}
/* Should have consumed exactly the expected amount of fast-path memory. */
- Assert(fpPtr = fpEndPtr);
+ Assert(fpPtr == fpEndPtr);
/*
* Save pointers to the blocks of PGPROC structures reserved for auxiliary