mirror of
https://github.com/samba-team/samba.git
synced 2025-12-04 08:23:50 +03:00
s3:libsmb:nmblib: use NUMERIC_CMP in status_compare
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:
committed by
Andrew Bartlett
parent
7ba6fcb936
commit
31c322874b
@@ -1235,8 +1235,10 @@ static unsigned char sort_ip[4];
|
|||||||
|
|
||||||
static int name_query_comp(unsigned char *p1, unsigned char *p2)
|
static int name_query_comp(unsigned char *p1, unsigned char *p2)
|
||||||
{
|
{
|
||||||
return matching_len_bits(p2+2, sort_ip, 4) -
|
int a = matching_len_bits(p1+2, sort_ip, 4);
|
||||||
matching_len_bits(p1+2, sort_ip, 4);
|
int b = matching_len_bits(p2+2, sort_ip, 4);
|
||||||
|
/* reverse sort -- p2 derived value comes first */
|
||||||
|
return NUMERIC_CMP(b, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user