]> git.ipfire.org Git - thirdparty/samba.git/commit
lib/socket: rearrange iface_comp() to use NUMERIC_CMP
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 8 Apr 2024 05:06:57 +0000 (17:06 +1200)
committerJule Anger <janger@samba.org>
Mon, 10 Jun 2024 13:25:17 +0000 (13:25 +0000)
commitf0f9598d5d10a75858d8f3dc326eb210625ba9a8
tree3cc458d25ccc8c95faf956fc312fe9c2f9bc8eee
parentc1819217c0a46a80dc18f16744783746ac1b7be2
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>
(cherry picked from commit 7ba6fcb93656e5e88e1d5bcd6002747aa64f0a3a)
lib/socket/interfaces.c