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/journal-remote | |
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/journal-remote')
-rw-r--r-- | src/journal-remote/journal-remote.c | 4 | ||||
-rw-r--r-- | src/journal-remote/microhttpd-util.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index ff46023920..da52e5b86e 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -259,8 +259,8 @@ static int get_writer(RemoteServer *s, const char *host, return r; } - *writer = w; - w = NULL; + *writer = TAKE_PTR(w); + return 0; } diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index 2466c4f2b5..fe588eddfb 100644 --- a/src/journal-remote/microhttpd-util.c +++ b/src/journal-remote/microhttpd-util.c @@ -314,10 +314,8 @@ int check_permissions(struct MHD_Connection *connection, int *code, char **hostn log_debug("Connection from %s", buf); - if (hostname) { - *hostname = buf; - buf = NULL; - } + if (hostname) + *hostname = TAKE_PTR(buf); r = verify_cert_authorized(session); if (r < 0) { |