more fd fixes because I'm braindead today

SVN revision: 55904
This commit is contained in:
Mike Blumenkrantz 2011-01-05 21:13:38 +00:00
parent 3da7cbc47c
commit d434bb981e
2 changed files with 1 additions and 10 deletions

View File

@ -5,7 +5,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <Eeze.h>
#include "eeze_udev_private.h"
@ -305,13 +304,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)
{
if (devcheck >= 0) close(devcheck);
goto out;
}
if (devcheck < 0) goto out;
close(devcheck);
}

View File

@ -5,7 +5,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <Ecore.h>
#include <Eeze.h>
@ -148,9 +147,8 @@ _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;
if (devcheck < 0) goto error;
close(devcheck);
}