diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-06-23 21:54:47 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-06-23 21:54:47 +0000 |
commit | de405c7145120145d628122751a0ed2030f722ef (patch) | |
tree | 0b594fc34512be640ff7bb03db263448b340e04c /lib/libc/stdlib/exit.c | |
parent | 5ad8ec82779efbd25afbdaef579349c343a9da04 (diff) | |
download | FreeBSD-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 'lib/libc/stdlib/exit.c')
0 files changed, 0 insertions, 0 deletions