chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fsck: use _cleanup_close_pair_ where appropriate
[elogind.git]
/
src
/
fsck
/
fsck.c
diff --git
a/src/fsck/fsck.c
b/src/fsck/fsck.c
index a4a15da1bf630e8a050f422cfd948f3c9904172c..f3e90a8dbf3781de34d3bda487e57d4f220ad884 100644
(file)
--- a/
src/fsck/fsck.c
+++ b/
src/fsck/fsck.c
@@
-203,7
+203,7
@@
int main(int argc, char *argv[]) {
_cleanup_udev_device_unref_ struct udev_device *udev_device = NULL;
const char *device, *type;
bool root_directory;
_cleanup_udev_device_unref_ struct udev_device *udev_device = NULL;
const char *device, *type;
bool root_directory;
- int progress_pipe[2] = { -1, -1 };
+
_cleanup_close_pair_
int progress_pipe[2] = { -1, -1 };
char dash_c[sizeof("-C")-1 + DECIMAL_STR_MAX(int) + 1];
struct stat st;
char dash_c[sizeof("-C")-1 + DECIMAL_STR_MAX(int) + 1];
struct stat st;
@@
-328,7
+328,7
@@
int main(int argc, char *argv[]) {
goto finish;
} else if (pid == 0) {
/* Child */
goto finish;
} else if (pid == 0) {
/* Child */
- safe_close(progress_pipe[0]);
+
progress_pipe[0] =
safe_close(progress_pipe[0]);
execv(cmdline[0], (char**) cmdline);
_exit(8); /* Operational error */
}
execv(cmdline[0], (char**) cmdline);
_exit(8); /* Operational error */
}
@@
-373,7
+373,5
@@
int main(int argc, char *argv[]) {
touch("/run/systemd/quotacheck");
finish:
touch("/run/systemd/quotacheck");
finish:
- safe_close_pair(progress_pipe);
-
return r;
}
return r;
}