avoid linux 2.6.14 was: Re: 9.3.2b1 errno2result.c:109: unexpected error: unable to convert errno to isc_result: 14: Bad address

Paul Vixie paul at vix.com
Tue Nov 8 21:50:11 UTC 2005

# > # Using if (len <= 0) is safe even if len cannot be <0.
# > 
# > safe, but wrong.
# I've seen cases where len is defined as an int and then value of len is
# -1 if the function that assigns it fails. Bad code practice, of course,
# but we weren't provided a lot of information.

you said "cannot be <0".  in that case you'd ASSERT() that requirement.
if -1 is used as a magic cookie then that's probably ugly but not wrong.

More information about the bind-workers mailing list