diff options
author | Omar Polo <op@cvs.openbsd.org> | 2024-05-14 13:28:09 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2024-05-14 13:28:09 +0000 |
commit | a10c51db88d86672e1c4c48c643f8e400f18ea2a (patch) | |
tree | 1a17089d832f61a4c61cba5cac15402cf4754dbf /usr.sbin/smtpd | |
parent | 788a4de5f4a7970a7e44d1b7f04b64a200a3cb86 (diff) |
use C99 syntax for filling the table_backend structs; ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/table_db.c | 22 | ||||
-rw-r--r-- | usr.sbin/smtpd/table_getpwnam.c | 21 | ||||
-rw-r--r-- | usr.sbin/smtpd/table_proc.c | 22 | ||||
-rw-r--r-- | usr.sbin/smtpd/table_static.c | 22 |
4 files changed, 44 insertions, 43 deletions
diff --git a/usr.sbin/smtpd/table_db.c b/usr.sbin/smtpd/table_db.c index b4db8f7ccae..b48f0406551 100644 --- a/usr.sbin/smtpd/table_db.c +++ b/usr.sbin/smtpd/table_db.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_db.c,v 1.25 2021/09/22 17:09:07 eric Exp $ */ +/* $OpenBSD: table_db.c,v 1.26 2024/05/14 13:28:08 op Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@poolp.org> @@ -41,18 +41,18 @@ static char *table_db_get_entry_match(void *, const char *, size_t *, int(*)(const char *, const char *)); struct table_backend table_backend_db = { - "db", - K_ALIAS|K_CREDENTIALS|K_DOMAIN|K_NETADDR|K_USERINFO| + .name = "db", + .services = K_ALIAS|K_CREDENTIALS|K_DOMAIN|K_NETADDR|K_USERINFO| K_SOURCE|K_MAILADDR|K_ADDRNAME|K_MAILADDRMAP|K_RELAYHOST| K_STRING|K_REGEX, - table_db_config, - NULL, - NULL, - table_db_open, - table_db_update, - table_db_close, - table_db_lookup, - table_db_fetch, + .config = table_db_config, + .add = NULL, + .dump = NULL, + .open = table_db_open, + .update = table_db_update, + .close = table_db_close, + .lookup = table_db_lookup, + .fetch = table_db_fetch, }; static struct keycmp { diff --git a/usr.sbin/smtpd/table_getpwnam.c b/usr.sbin/smtpd/table_getpwnam.c index d40f1920073..36e6adc710e 100644 --- a/usr.sbin/smtpd/table_getpwnam.c +++ b/usr.sbin/smtpd/table_getpwnam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_getpwnam.c,v 1.14 2021/06/14 17:58:16 eric Exp $ */ +/* $OpenBSD: table_getpwnam.c,v 1.15 2024/05/14 13:28:08 op Exp $ */ /* * Copyright (c) 2012 Gilles Chehade <gilles@poolp.org> @@ -30,15 +30,16 @@ static int table_getpwnam_lookup(struct table *, enum table_service, const char static void table_getpwnam_close(struct table *); struct table_backend table_backend_getpwnam = { - "getpwnam", - K_USERINFO, - table_getpwnam_config, - NULL, - NULL, - table_getpwnam_open, - table_getpwnam_update, - table_getpwnam_close, - table_getpwnam_lookup, + .name = "getpwnam", + .services = K_USERINFO, + .config = table_getpwnam_config, + .add = NULL, + .dump = NULL, + .open = table_getpwnam_open, + .update = table_getpwnam_update, + .close = table_getpwnam_close, + .lookup = table_getpwnam_lookup, + .fetch = NULL, }; diff --git a/usr.sbin/smtpd/table_proc.c b/usr.sbin/smtpd/table_proc.c index bd40bac6bf5..b823707eb30 100644 --- a/usr.sbin/smtpd/table_proc.c +++ b/usr.sbin/smtpd/table_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_proc.c,v 1.18 2024/05/07 12:10:06 op Exp $ */ +/* $OpenBSD: table_proc.c,v 1.19 2024/05/14 13:28:08 op Exp $ */ /* * Copyright (c) 2024 Omar Polo <op@openbsd.org> @@ -280,14 +280,14 @@ table_proc_fetch(struct table *table, enum table_service s, char **dst) } struct table_backend table_backend_proc = { - "proc", - K_ANY, - NULL, - NULL, - NULL, - table_proc_open, - table_proc_update, - table_proc_close, - table_proc_lookup, - table_proc_fetch, + .name = "proc", + .services = K_ANY, + .config = NULL, + .add = NULL, + .dump = NULL, + .open = table_proc_open, + .update = table_proc_update, + .close = table_proc_close, + .lookup = table_proc_lookup, + .fetch = table_proc_fetch, }; diff --git a/usr.sbin/smtpd/table_static.c b/usr.sbin/smtpd/table_static.c index 85f2b7a4f81..9d202bb6c7c 100644 --- a/usr.sbin/smtpd/table_static.c +++ b/usr.sbin/smtpd/table_static.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_static.c,v 1.34 2024/02/11 09:24:26 op Exp $ */ +/* $OpenBSD: table_static.c,v 1.35 2024/05/14 13:28:08 op Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -43,18 +43,18 @@ static int table_static_fetch(struct table *, enum table_service, char **); static void table_static_close(struct table *); struct table_backend table_backend_static = { - "static", - K_ALIAS|K_CREDENTIALS|K_DOMAIN|K_NETADDR|K_USERINFO| + .name = "static", + .services = K_ALIAS|K_CREDENTIALS|K_DOMAIN|K_NETADDR|K_USERINFO| K_SOURCE|K_MAILADDR|K_ADDRNAME|K_MAILADDRMAP|K_RELAYHOST| K_STRING|K_REGEX, - table_static_config, - table_static_add, - table_static_dump, - table_static_open, - table_static_update, - table_static_close, - table_static_lookup, - table_static_fetch + .config = table_static_config, + .add = table_static_add, + .dump = table_static_dump, + .open = table_static_open, + .update = table_static_update, + .close = table_static_close, + .lookup = table_static_lookup, + .fetch = table_static_fetch }; static struct keycmp { |