diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:07:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:07:29 +0000 |
commit | 5f0615a601e014ed2da5c8117a9bc6df0bc6aad8 (patch) | |
tree | c271a7d4ed696305c1e34c72ce426f14f9ee6be4 /lib/ldb/include | |
parent | Releasing progress-linux version 2:4.20.1+dfsg-5~progress7.99u1. (diff) | |
download | samba-5f0615a601e014ed2da5c8117a9bc6df0bc6aad8.tar.xz samba-5f0615a601e014ed2da5c8117a9bc6df0bc6aad8.zip |
Merging upstream version 2:4.20.2+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/ldb/include/ldb.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h index 5d83a27..98859d4 100644 --- a/lib/ldb/include/ldb.h +++ b/lib/ldb/include/ldb.h @@ -2326,6 +2326,22 @@ do { \ } while (0) #endif +#ifndef NUMERIC_CMP +/* + * NUMERIC_CMP is a safe replacement for `a - b` in comparison + * functions. It will work on integers, pointers, and floats. + * + * Rather than + * + * return a - b; + * + * use + * + * return NUMERIC_CMP(a, b); + */ +#define NUMERIC_CMP(a, b) (((a) > (b)) - ((a) < (b))) +#endif + /** |