diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-23 16:30:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-26 14:08:46 +0100 |
commit | 49fe5c099639aa2111efb56c6ac609955a279279 (patch) | |
tree | bff451fbe68b0aa57fe8ad198695384eab264545 /src/journal-remote/journal-remote-main.c | |
parent | 52f1552073047195d51901f7e5a5a4fa3189034e (diff) | |
download | systemd-49fe5c099639aa2111efb56c6ac609955a279279.tar.gz |
tree-wide: port various places over to STARTSWITH_SET()
Diffstat (limited to 'src/journal-remote/journal-remote-main.c')
-rw-r--r-- | src/journal-remote/journal-remote-main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 44f3450d87..02078dcb4a 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -630,10 +630,9 @@ static int create_remoteserver( if (fd < 0) return fd; - hostname = - startswith(arg_url, "https://") ?: - startswith(arg_url, "http://") ?: - arg_url; + hostname = STARTSWITH_SET(arg_url, "https://", "http://"); + if (!hostname) + hostname = arg_url; hostname = strdupa(hostname); if ((p = strchr(hostname, '/'))) |