aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-30 03:35:31 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-30 03:35:31 +0200
commit894b278c9cc853807c85bf58b9774ea8147ac9f6 (patch)
tree539e90f207cb7e23114cc6b5d31bfd6801528d54 /src
parentMakefile: add some banners (diff)
downloadcimple-894b278c9cc853807c85bf58b9774ea8147ac9f6.tar.gz
cimple-894b278c9cc853807c85bf58b9774ea8147ac9f6.zip
use designated struct initializers more
Diffstat (limited to 'src')
-rw-r--r--src/client_main.c5
-rw-r--r--src/server_main.c5
-rw-r--r--src/worker_main.c5
3 files changed, 12 insertions, 3 deletions
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;
}