chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: rework /proc/cmdline parser to use unquote_first_word()
[elogind.git]
/
src
/
shared
/
fdset.c
diff --git
a/src/shared/fdset.c
b/src/shared/fdset.c
index a2c861de3f4b0486f7fbb742e717237555b16c09..37cbd8526cdedc024bf0734178571f5b4a040c95 100644
(file)
--- a/
src/shared/fdset.c
+++ b/
src/shared/fdset.c
@@
-38,7
+38,7
@@
#define PTR_TO_FD(p) (PTR_TO_INT(p)-1)
FDSet *fdset_new(void) {
#define PTR_TO_FD(p) (PTR_TO_INT(p)-1)
FDSet *fdset_new(void) {
- return MAKE_FDSET(set_new(
trivial_hash_func, trivial_compare_func
));
+ return MAKE_FDSET(set_new(
NULL
));
}
void fdset_free(FDSet *s) {
}
void fdset_free(FDSet *s) {
@@
-104,7
+104,7
@@
int fdset_remove(FDSet *s, int fd) {
}
int fdset_new_fill(FDSet **_s) {
}
int fdset_new_fill(FDSet **_s) {
-
DIR *d
;
+
_cleanup_closedir_ DIR *d = NULL
;
struct dirent *de;
int r = 0;
FDSet *s;
struct dirent *de;
int r = 0;
FDSet *s;
@@
-150,8
+150,6
@@
int fdset_new_fill(FDSet **_s) {
s = NULL;
finish:
s = NULL;
finish:
- closedir(d);
-
/* We won't close the fds here! */
if (s)
set_free(MAKE_SET(s));
/* We won't close the fds here! */
if (s)
set_free(MAKE_SET(s));