mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-20 10:48:56 +08:00
mdbx: refine mdbx_cmp2int().
Change-Id: I5497db2e88d764e18a1aae1809dc66fd62a5adbe
This commit is contained in:
6
mdb.c
6
mdb.c
@@ -5136,7 +5136,11 @@ mdb_env_close(MDB_env *env)
|
||||
* | 1, a > b
|
||||
* \
|
||||
*/
|
||||
#define mdbx_cmp2int(a, b) (((a) > (b)) - ((b) > (a)))
|
||||
#if 1
|
||||
# define mdbx_cmp2int(a, b) (((b) > (a)) ? -1 : (a) > (b))
|
||||
#else
|
||||
# define mdbx_cmp2int(a, b) (((a) > (b)) - ((b) > (a)))
|
||||
#endif
|
||||
|
||||
/** Compare two items pointing at aligned unsigned int's. */
|
||||
static int __hot
|
||||
|
Reference in New Issue
Block a user