mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +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>
This commit is contained in:
parent
ee4ebcccd7
commit
09c98ff126
@ -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