mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
util:binsearch: user NUMERIC_CMP()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 09c98ff126
)
This commit is contained in:
parent
51fa8c0168
commit
be4965c69c
@ -23,17 +23,19 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/util/binsearch.h"
|
||||
#include "lib/util/tsort.h"
|
||||
#include "torture/torture.h"
|
||||
#include "torture/local/proto.h"
|
||||
|
||||
static int int_cmp(int a, int b)
|
||||
{
|
||||
return a - b;
|
||||
return NUMERIC_CMP(a, b);
|
||||
}
|
||||
|
||||
static int int_cmp_p(int a, int *b)
|
||||
{
|
||||
return a - *b;
|
||||
int _b = *b;
|
||||
return NUMERIC_CMP(a, _b);
|
||||
}
|
||||
|
||||
static bool test_binsearch_v(struct torture_context *tctx)
|
||||
|
Loading…
Reference in New Issue
Block a user