-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/12/2009 12:12 PM, Simo Sorce wrote:
On Wed, 2009-08-12 at 11:41 -0400, Dmitri Pal wrote:
> Ah! Ok, that makes sense.
> I opened a ticket (103) to review the collection, INI and ELAPI code
> about the use of errno.
> I tried not to make this mistake but it seems like I did and you
> caught
> it - good!
> But this grants a better, a more thorough review of this and other
> places.
>
> If everything else is Ok please push the patch.
> I will then submit different ticket related patches on top of it
> later.
In general, where possible it would be better to explicitly return an
error code and not use errno.
errno is known to be prone to this kind of error, especially when you
change existing code. It is extremely simple to forget about errno and
add a new call that resets it.
And you will face this not only internally but also from users of the
API if you force them to check errno for errors.
Please avoid relying/using errno where possible and instead return the
error explicitly.
Simo.
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel
Patches are pushed to master.
- --
Stephen Gallagher
RHCE 804006346421761
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org/
iEYEARECAAYFAkqC7OcACgkQeiVVYja6o6PmUwCgrs6za84LOZl4hYx2u0NrUQRm
5pQAnjI069ANY4tcdd2hFHduYKEBzsiJ
=hP4X
-----END PGP SIGNATURE-----