From 894b278c9cc853807c85bf58b9774ea8147ac9f6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 30 Jun 2023 03:35:31 +0200 Subject: use designated struct initializers more --- src/client_main.c | 5 ++++- src/server_main.c | 5 ++++- src/worker_main.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client_main.c b/src/client_main.c index ca79800..0dbdcc6 100644 --- a/src/client_main.c +++ b/src/client_main.c @@ -15,7 +15,10 @@ static struct settings default_settings(void) { - struct settings settings = {default_host, default_port}; + struct settings settings = { + .host = default_host, + .port = default_port, + }; return settings; } diff --git a/src/server_main.c b/src/server_main.c index 2ebabba..65541ff 100644 --- a/src/server_main.c +++ b/src/server_main.c @@ -15,7 +15,10 @@ static struct settings default_settings(void) { - struct settings settings = {default_port, default_sqlite_path}; + struct settings settings = { + .port = default_port, + .sqlite_path = default_sqlite_path, + }; return settings; } diff --git a/src/worker_main.c b/src/worker_main.c index 18e656a..e8468f8 100644 --- a/src/worker_main.c +++ b/src/worker_main.c @@ -15,7 +15,10 @@ static struct settings default_settings(void) { - struct settings settings = {default_host, default_port}; + struct settings settings = { + .host = default_host, + .port = default_port, + }; return settings; } -- cgit v1.2.3