1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

path-util: make use of TAKE_PTR() where we can

This commit is contained in:
Lennart Poettering 2020-07-29 19:09:48 +02:00
parent b6eb208b29
commit 2f2c60d7fe

View File

@ -640,10 +640,8 @@ int find_binary(const char *name, char **ret) {
if (access(j, X_OK) >= 0) {
/* Found it! */
if (ret) {
*ret = path_simplify(j, false);
j = NULL;
}
if (ret)
*ret = path_simplify(TAKE_PTR(j), false);
return 0;
}