summaryrefslogtreecommitdiff
path: root/src/usr.bin
diff options
context:
space:
mode:
authortb <>2021-12-28 20:07:17 +0000
committertb <>2021-12-28 20:07:17 +0000
commitb2312e075fb4443cba28692fd6c6331e7ef2a749 (patch)
treef3acc285123c98d1d64016a9d25ac0165414ec80 /src/usr.bin
parent5567885d9cda37267ff204c1ffd31f41dd0425d4 (diff)
downloadopenbsd-b2312e075fb4443cba28692fd6c6331e7ef2a749.tar.gz
openbsd-b2312e075fb4443cba28692fd6c6331e7ef2a749.tar.bz2
openbsd-b2312e075fb4443cba28692fd6c6331e7ef2a749.zip
Make IPAddressFamily_cmp() more pleasing on the eye
Define and use MINIMUM() instead of a ternary operator and separate the code from the declarations. Also, we can spare a line to make the return legible instead of squeezing it into another ternary operator. addressFamily->data contains a two-bytes AFI and an optional one-byte SAFI. This function currently also compares any trailing garbage that may be present. Since comparison functions can't really error, this needs to be checked bofore it is used. Such checks will be added in subsequent commits. ok jsing
Diffstat (limited to 'src/usr.bin')
0 files changed, 0 insertions, 0 deletions