diff options
author | Moti Cohen <moti.cohen@redis.com> | 2022-08-03 19:38:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 19:38:08 +0300 |
commit | 1aa6c4ab9294af4eef50fbd82079051f4c06dd42 (patch) | |
tree | df96cdc70b889964ae8d0410b6ee9b2affb5f701 /src/rdb.h | |
parent | dcafee55a580430b17ca237799a4eff245919c3b (diff) | |
download | redis-1aa6c4ab9294af4eef50fbd82079051f4c06dd42.tar.gz |
Adding parentheses and do-while(0) to macros (#11080)
Fixing few macros that doesn't follows most basic safety conventions
which is wrapping any usage of passed variable
with parentheses and if written more than one command, then wrap
it with do-while(0) (or parentheses).
Diffstat (limited to 'src/rdb.h')
-rw-r--r-- | src/rdb.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -98,7 +98,7 @@ /* NOTE: WHEN ADDING NEW RDB TYPE, UPDATE rdbIsObjectType() BELOW */ /* Test if a type is an object type. */ -#define rdbIsObjectType(t) ((t >= 0 && t <= 7) || (t >= 9 && t <= 19)) +#define rdbIsObjectType(t) (((t) >= 0 && (t) <= 7) || ((t) >= 9 && (t) <= 19)) /* Special RDB opcodes (saved/loaded with rdbSaveType/rdbLoadType). */ #define RDB_OPCODE_FUNCTION2 245 /* function library data */ |