diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:26:26 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:26:26 +0900 |
commit | 1cc6c93a9569a9f2664d0d26cd0e50408307c430 (patch) | |
tree | 57e115a1beb9b097f731da79c3192015ff35cc94 /src/shared/bus-util.c | |
parent | 3d282fff063c81893dc4bbd0282193d20dd5357e (diff) | |
download | systemd-1cc6c93a9569a9f2664d0d26cd0e50408307c430.tar.gz |
tree-wide: use TAKE_PTR() and TAKE_FD() macros
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r-- | src/shared/bus-util.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index df382f77a6..d9cb33443f 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -604,8 +604,7 @@ int bus_connect_system_systemd(sd_bus **_bus) { if (r < 0) return r; - *_bus = bus; - bus = NULL; + *_bus = TAKE_PTR(bus); return 0; } @@ -642,8 +641,7 @@ int bus_connect_user_systemd(sd_bus **_bus) { if (r < 0) return r; - *_bus = bus; - bus = NULL; + *_bus = TAKE_PTR(bus); return 0; } @@ -1338,8 +1336,7 @@ int bus_connect_transport(BusTransport transport, const char *host, bool user, s if (r < 0) return r; - *ret = bus; - bus = NULL; + *ret = TAKE_PTR(bus); return 0; } @@ -1718,8 +1715,7 @@ int bus_open_system_watch_bind(sd_bus **ret) { if (r < 0) return r; - *ret = bus; - bus = NULL; + *ret = TAKE_PTR(bus); return 0; } |