olmstead@sri-unix (08/11/82)
I haven't seen this one on the net before, but then I don't look all that frequently, so apologies if this is old stuff: Our version (4.1bsd) of nlist(3) returns, under various conditions, the values -1, 0, and NULL. Now I know the documentation doesn't claim to return any value at all, which is mostly why I was reading the source in the first place. I can't believe an interface that tells me I have to see if every entry in a list has been set to zero to know whether the call failed or not. Even given this, it's pretty weird to return 0 in some places and NULL (that's right, NULL is the same one from stdio, where it's defined to be 0) in other places. Does anyone ever look at nlist's return value?