summaryrefslogtreecommitdiffstats
path: root/dund/dun.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-07-26 13:32:44 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-07-26 13:32:44 +0000
commitb102348e988e4abc5d579ce13c067ce2c885aaf7 (patch)
treef7df67ce818aa8720f956171765889684c528ee1 /dund/dun.c
parentabaf87668c896d8cebcfa1081eec195cd0008740 (diff)
Fix declared with attribute warn_unused_result errors
Diffstat (limited to 'dund/dun.c')
-rw-r--r--dund/dun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dund/dun.c b/dund/dun.c
index 4fbbad69..718da7ec 100644
--- a/dund/dun.c
+++ b/dund/dun.c
@@ -98,7 +98,9 @@ static int uses_rfcomm(char *path, char *dev)
dir = opendir(path);
if (!dir)
return 0;
- chdir(path);
+
+ if (chdir(path) < 0)
+ return 0;
while ((de = readdir(dir)) != NULL) {
char link[PATH_MAX + 1];
@@ -109,7 +111,9 @@ static int uses_rfcomm(char *path, char *dev)
return 1;
}
}
+
closedir(dir);
+
return 0;
}