summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-23 16:30:23 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-26 14:08:46 +0100
commit49fe5c099639aa2111efb56c6ac609955a279279 (patch)
treebff451fbe68b0aa57fe8ad198695384eab264545 /src/journal-remote/journal-remote-main.c
parent52f1552073047195d51901f7e5a5a4fa3189034e (diff)
downloadsystemd-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.c7
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, '/')))