|
I consider setting errno to zero to be a bad practice. You risk screwing up other routines when you set it to zero. You also risk getting "false alarms" when you use it to determine if something failed.
It's not rocket science. Each API returns a value to tell if you if it succeeded or failed -- use THAT VALUE to determine if it failed. Use errno to get a description of the last error (from any routine) that failed.
Why do people insist on doing this another way?!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.