Eric Norum wrote:
which leads to pseudo errors; errno should be checked only if the
return
value is abnormal. It should be just
if(stat!=RPC_SUCCESS) {
/* error handling */
}
Both the places where this code appears are preceded by
assignments of 0 to errno. The fact that this was done makes me
think that the code was placed there for a reason. There appear
to be several substandard versions of RPC libraries out there.
That may be true (I have no knowledge), but on vxWorks at least
what Ben says is right — if you haven't been handed an error return
status you should assume that any value placed in errno has been
handled internally by the routine you called. I believe that older
versions of auto-save/ restore suffered from the same
misapprehension and generated bogus error messages as a result, but
I think Tim Mooney has cleaned them all up now.
- Andrew
--
When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something
is impossible, he is very probably wrong. -- Arthur C. Clarke