diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 07:26:26 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 07:26:26 +0200 |
commit | 1cc6c93a9569a9f2664d0d26cd0e50408307c430 (patch) | |
tree | 57e115a1beb9b097f731da79c3192015ff35cc94 /src/core/load-dropin.c | |
parent | network: fix typo in log message (diff) | |
download | systemd-1cc6c93a9569a9f2664d0d26cd0e50408307c430.tar.xz systemd-1cc6c93a9569a9f2664d0d26cd0e50408307c430.zip |
tree-wide: use TAKE_PTR() and TAKE_FD() macros
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r-- | src/core/load-dropin.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c index 57ed686d1f..0702219f24 100644 --- a/src/core/load-dropin.c +++ b/src/core/load-dropin.c @@ -146,10 +146,9 @@ int unit_load_dropin(Unit *u) { if (r <= 0) return 0; - if (!u->dropin_paths) { - u->dropin_paths = l; - l = NULL; - } else { + if (!u->dropin_paths) + u->dropin_paths = TAKE_PTR(l); + else { r = strv_extend_strv(&u->dropin_paths, l, true); if (r < 0) return log_oom(); |