summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-05 20:32:42 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-05 20:32:42 +0000
commit3da7cbc47c27c4d8def7778f2ba9e2f212e813d1 (patch)
treeeeea280404bc4f39d20ce7bf32542c40b690fa71 /legacy
parent1707697d8aebde35559eb691549b90b1c118a692 (diff)
zero errno before open calls
SVN revision: 55902
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eeze/src/lib/eeze_udev_find.c1
-rw-r--r--legacy/eeze/src/lib/eeze_udev_watch.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/legacy/eeze/src/lib/eeze_udev_find.c b/legacy/eeze/src/lib/eeze_udev_find.c
index 69fa53e513..98815c78e9 100644
--- a/legacy/eeze/src/lib/eeze_udev_find.c
+++ b/legacy/eeze/src/lib/eeze_udev_find.c
@@ -305,6 +305,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
305 { 305 {
306 int devcheck; 306 int devcheck;
307 307
308 errno = 0;
308 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL); 309 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
309 if (errno) 310 if (errno)
310 { 311 {
diff --git a/legacy/eeze/src/lib/eeze_udev_watch.c b/legacy/eeze/src/lib/eeze_udev_watch.c
index 0b013479d1..d0fbada8f3 100644
--- a/legacy/eeze/src/lib/eeze_udev_watch.c
+++ b/legacy/eeze/src/lib/eeze_udev_watch.c
@@ -148,6 +148,7 @@ _get_syspath_from_watch(void *data,
148 { 148 {
149 int devcheck; 149 int devcheck;
150 150
151 errno = 0;
151 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL); 152 devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
152 if ((devcheck < 0) || errno) goto error; 153 if ((devcheck < 0) || errno) goto error;
153 close(devcheck); 154 close(devcheck);