summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-06-23 21:54:47 +0000
committeriedowse <iedowse@FreeBSD.org>2001-06-23 21:54:47 +0000
commitde405c7145120145d628122751a0ed2030f722ef (patch)
tree0b594fc34512be640ff7bb03db263448b340e04c /usr.bin
parent5ad8ec82779efbd25afbdaef579349c343a9da04 (diff)
downloadFreeBSD-src-de405c7145120145d628122751a0ed2030f722ef.zip
FreeBSD-src-de405c7145120145d628122751a0ed2030f722ef.tar.gz
Fix some return-value brain-damage in forward_register(). This
function has a return type of u_int32_t, into which it was somehow supposed to encode: * A valid 32-bit XID (which could be any value including 0). * 0, meaning a duplicate request. * -1, meaning a malloc failed (!); We now ensure that all XIDs are non-zero, and pass the XID out via a pointer argument. In forward_find() and free_slot_by_xid(), remove an unnecessary and confusing test for a negative result from an unsigned modulo operation, but add an unnecessary cast to highlight why.
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud