lib/socket: rearrange iface_comp() to use NUMERIC_CMP
commit7ba6fcb93656e5e88e1d5bcd6002747aa64f0a3a
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 8 Apr 2024 05:06:57 +0000 (8 17:06 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Apr 2024 01:33:29 +0000 (23 01:33 +0000)
treea81df6be9577ae500bea3ae7e442627602f61b65
parentacaa1323d0337ae9339dfff9f856ea54725a86ac
lib/socket: rearrange iface_comp() to use NUMERIC_CMP

We rearrange rather than just replacing the subtraction, because that
would call ntohl() more than necessary, and I think the flow is a bit
clearer this way.

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>
lib/socket/interfaces.c