zero errno before open calls

SVN revision: 55902
This commit is contained in:
Mike Blumenkrantz 2011-01-05 20:32:42 +00:00
parent 1707697d8a
commit 3da7cbc47c
2 changed files with 2 additions and 0 deletions

View File

@ -305,6 +305,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
{
int devcheck;
errno = 0;
devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
if (errno)
{

View File

@ -148,6 +148,7 @@ _get_syspath_from_watch(void *data,
{
int devcheck;
errno = 0;
devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
if ((devcheck < 0) || errno) goto error;
close(devcheck);