forked from enlightenment/efl
more fd fixes because I'm braindead today
SVN revision: 55904
This commit is contained in:
parent
3da7cbc47c
commit
d434bb981e
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue