chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use more _cleanup_ macro
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 882a6908f2b182833bf220db6f719245cc0700f6..e7ff0f8840fdbe5d85c82e0c55d0367a4833c2b7 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-1440,7
+1440,7
@@
_pure_ static bool fd_in_set(int fd, const int fdset[], unsigned n_fdset) {
}
int close_all_fds(const int except[], unsigned n_except) {
}
int close_all_fds(const int except[], unsigned n_except) {
-
DIR *d
;
+
_cleanup_closedir_ DIR *d = NULL
;
struct dirent *de;
int r = 0;
struct dirent *de;
int r = 0;
@@
-1495,7
+1495,6
@@
int close_all_fds(const int except[], unsigned n_except) {
}
}
}
}
- closedir(d);
return r;
}
return r;
}
@@
-1514,6
+1513,7
@@
bool fstype_is_network(const char *fstype) {
static const char table[] =
"cifs\0"
"smbfs\0"
static const char table[] =
"cifs\0"
"smbfs\0"
+ "sshfs\0"
"ncpfs\0"
"ncp\0"
"nfs\0"
"ncpfs\0"
"ncp\0"
"nfs\0"