mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3:libsmb:namequery: use NUMERIC_CMP in addr_compare
This one was OK, as the numbers are tightly bound, but there is no
real reason not to do it safely.
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 3414a894ad
)
This commit is contained in:
parent
f9a7ded26d
commit
ccd94628b5
@ -34,6 +34,7 @@
|
|||||||
#include "lib/gencache.h"
|
#include "lib/gencache.h"
|
||||||
#include "librpc/gen_ndr/dns.h"
|
#include "librpc/gen_ndr/dns.h"
|
||||||
#include "lib/util/util_net.h"
|
#include "lib/util/util_net.h"
|
||||||
|
#include "lib/util/tsort.h"
|
||||||
#include "lib/util/string_wrappers.h"
|
#include "lib/util/string_wrappers.h"
|
||||||
|
|
||||||
/* nmbd.c sets this to True. */
|
/* nmbd.c sets this to True. */
|
||||||
@ -1183,7 +1184,7 @@ static int addr_compare(const struct sockaddr_storage *ss1,
|
|||||||
max_bits2 += 128;
|
max_bits2 += 128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return max_bits2 - max_bits1;
|
return NUMERIC_CMP(max_bits2, max_bits1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user