I think check each function if it's returning an error and you'll be fine.
Printable View
I think check each function if it's returning an error and you'll be fine.
There is: the C standard library contains some functions that indicate an error only by setting errno. Hence, if you don't set errno to 0 right before the function call, you can't tell whether errno has been modified by the function or not.
By the way, the standard guarantees that no library function will ever set errno to 0.
Greets,
Philip
Of course, that looks like a mismatch in design. well, what solution would you propose in that case?
Yeah... I'll do it tomorrow. Well, actually I've never used one of them. And it's not their "fault". There are some factors not existing in ANSI C. For example threads. And they've done a good job. I like C. Especially C99.