1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s3:brlock: use NUMERIC_CMP in #ifdef-zeroed lock_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:
Douglas Bagnall 2024-04-07 15:07:20 +12:00 committed by Andrew Bartlett
parent 5fe488d515
commit 9b73235d49

View File

@ -408,12 +408,9 @@ static int lock_compare(const struct lock_struct *lck1,
const struct lock_struct *lck2)
{
if (lck1->start != lck2->start) {
return (lck1->start - lck2->start);
return NUMERIC_CMP(lck1->start, lck2->start);
}
if (lck2->size != lck1->size) {
return ((int)lck1->size - (int)lck2->size);
}
return 0;
return NUMERIC_CMP(lck1->size, lck2->size);
}
#endif