tree-wide: port things over to FORMAT_PROC_FD_PATH()

This commit is contained in:
Lennart Poettering
2021-08-19 09:19:27 +02:00
parent 48a01cd934
commit ddb6eeafe2
15 changed files with 52 additions and 122 deletions
+2 -6
View File
@@ -50,12 +50,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
else
log_info(r == 0 ? "Done!" : "Action!");
if (orig_stdout_fd >= 0) {
char path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
xsprintf(path, "/proc/self/fd/%d", orig_stdout_fd);
assert_se(freopen(path, "w", stdout));
}
if (orig_stdout_fd >= 0)
assert_se(freopen(FORMAT_PROC_FD_PATH(orig_stdout_fd), "w", stdout));
release_busses(); /* We open the bus for communication with logind.
* It needs to be closed to avoid apparent leaks. */