summaryrefslogtreecommitdiff
path: root/src/common/db.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-01-09 21:44:27 +0100
committerHaru <haru@dotalux.com>2016-01-09 21:44:27 +0100
commite248c3394d7a2a76cfb39e0955ebab648ecc2bf0 (patch)
tree31d8b0b7de923cff4a49131b82a6ff4de2fd2769 /src/common/db.h
parent10f9f4282097f177d6ee0b26572dcf4308e6d6fb (diff)
downloadhercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.gz
hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.bz2
hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.tar.xz
hercules-e248c3394d7a2a76cfb39e0955ebab648ecc2bf0.zip
Sanitized various macros
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/db.h')
-rw-r--r--src/common/db.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/db.h b/src/common/db.h
index 205288f13..b73970947 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -1717,7 +1717,7 @@ HPShared struct db_interface *DB;
* @return negative if v1 is top, positive if v2 is top, 0 if equal.
*/
#define BHEAP_MINTOPCMP(v1, v2) \
- ( v1 == v2 ? 0 : v1 < v2 ? -1 : 1 )
+ ( (v1) == (v2) ? 0 : (v1) < (v2) ? -1 : 1 )
/**
* Generic comparator for a max-heap (maximum value at top).
@@ -1732,6 +1732,6 @@ HPShared struct db_interface *DB;
* @return negative if v1 is top, positive if v2 is top, 0 if equal.
*/
#define BHEAP_MAXTOPCMP(v1, v2) \
- ( v1 == v2 ? 0 : v1 > v2 ? -1 : 1 )
+ ( (v1) == (v2) ? 0 : (v1) > (v2) ? -1 : 1 )
#endif /* COMMON_DB_H */