summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-05 21:13:38 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-05 21:13:38 +0000
commitd434bb981e3f5ed81eb28e6ee9ac27eaf830a15c (patch)
treebb74722cbbf3f6a57f7aa3acf2b8ff5a268f5515 /legacy
parent3da7cbc47c27c4d8def7778f2ba9e2f212e813d1 (diff)
more fd fixes because I'm braindead today
SVN revision: 55904
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eeze/src/lib/eeze_udev_find.c7
-rw-r--r--legacy/eeze/src/lib/eeze_udev_watch.c4
2 files changed, 1 insertions, 10 deletions
diff --git a/legacy/eeze/src/lib/eeze_udev_find.c b/legacy/eeze/src/lib/eeze_udev_find.c
index 98815c78e9..08c4e8b55b 100644
--- a/legacy/eeze/src/lib/eeze_udev_find.c
+++ b/legacy/eeze/src/lib/eeze_udev_find.c
@@ -5,7 +5,6 @@
5#include <sys/types.h> 5#include <sys/types.h>
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8#include <errno.h>
9 8
10#include <Eeze.h> 9#include <Eeze.h>
11#include "eeze_udev_private.h" 10#include "eeze_udev_private.h"
@@ -305,13 +304,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
305 { 304 {
306 int devcheck; 305 int devcheck;
307 306
308 errno = 0;
309 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL); 307 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
310 if (errno)
311 {
312 if (devcheck >= 0) close(devcheck);
313 goto out;
314 }
315 if (devcheck < 0) goto out; 308 if (devcheck < 0) goto out;
316 close(devcheck); 309 close(devcheck);
317 } 310 }
diff --git a/legacy/eeze/src/lib/eeze_udev_watch.c b/legacy/eeze/src/lib/eeze_udev_watch.c
index d0fbada8f3..c61fcba33b 100644
--- a/legacy/eeze/src/lib/eeze_udev_watch.c
+++ b/legacy/eeze/src/lib/eeze_udev_watch.c
@@ -5,7 +5,6 @@
5#include <sys/types.h> 5#include <sys/types.h>
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8#include <errno.h>
9 8
10#include <Ecore.h> 9#include <Ecore.h>
11#include <Eeze.h> 10#include <Eeze.h>
@@ -148,9 +147,8 @@ _get_syspath_from_watch(void *data,
148 { 147 {
149 int devcheck; 148 int devcheck;
150 149
151 errno = 0;
152 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL); 150 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
153 if ((devcheck < 0) || errno) goto error; 151 if (devcheck < 0) goto error;
154 close(devcheck); 152 close(devcheck);
155 } 153 }
156 154