diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-14 14:16:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-05-14 17:11:44 +0200 |
commit | 90810f7a37347206da049e95773613484750187c (patch) | |
tree | 5c38096fb9f2c8dffd51b4894a1de97fe464917c /src/systemd | |
parent | 4b129fba3077999517d60c3208ffed2380381fb1 (diff) | |
download | systemd-90810f7a37347206da049e95773613484750187c.tar.gz |
sd-dhcp-server: some function prototype fix-ups
Let's use size_t for numbers of entries in memory.
Let's use const wherever appropriate.
Drop `_server` suffix from function name where we don't have it for
similar other cases.
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-dhcp-server.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/systemd/sd-dhcp-server.h b/src/systemd/sd-dhcp-server.h index 017d2d9cbb..4697f3dd3d 100644 --- a/src/systemd/sd-dhcp-server.h +++ b/src/systemd/sd-dhcp-server.h @@ -45,7 +45,7 @@ int sd_dhcp_server_is_running(sd_dhcp_server *server); int sd_dhcp_server_start(sd_dhcp_server *server); int sd_dhcp_server_stop(sd_dhcp_server *server); -int sd_dhcp_server_configure_pool(sd_dhcp_server *server, struct in_addr *address, unsigned char prefixlen, uint32_t offset, uint32_t size); +int sd_dhcp_server_configure_pool(sd_dhcp_server *server, const struct in_addr *address, unsigned char prefixlen, uint32_t offset, uint32_t size); int sd_dhcp_server_set_timezone(sd_dhcp_server *server, const char *timezone); int sd_dhcp_server_set_emit_router(sd_dhcp_server *server, int enabled); @@ -54,14 +54,14 @@ int sd_dhcp_server_set_servers( sd_dhcp_server *server, sd_dhcp_lease_info what, const struct in_addr addresses[], - unsigned n_addresses); - -int sd_dhcp_server_set_lpr(sd_dhcp_server *server, const struct in_addr lpr[], unsigned n); -int sd_dhcp_server_set_dns(sd_dhcp_server *server, const struct in_addr dns[], unsigned n); -int sd_dhcp_server_set_ntp(sd_dhcp_server *server, const struct in_addr ntp[], unsigned n); -int sd_dhcp_server_set_sip(sd_dhcp_server *server, const struct in_addr sip[], unsigned n); -int sd_dhcp_server_set_pop3_server(sd_dhcp_server *server, const struct in_addr pop3_server[], unsigned n); -int sd_dhcp_server_set_smtp_server(sd_dhcp_server *server, const struct in_addr smtp_server[], unsigned n); + size_t n_addresses); + +int sd_dhcp_server_set_lpr(sd_dhcp_server *server, const struct in_addr lpr[], size_t n); +int sd_dhcp_server_set_dns(sd_dhcp_server *server, const struct in_addr dns[], size_t n); +int sd_dhcp_server_set_ntp(sd_dhcp_server *server, const struct in_addr ntp[], size_t n); +int sd_dhcp_server_set_sip(sd_dhcp_server *server, const struct in_addr sip[], size_t n); +int sd_dhcp_server_set_pop3(sd_dhcp_server *server, const struct in_addr pop3_server[], size_t n); +int sd_dhcp_server_set_smtp(sd_dhcp_server *server, const struct in_addr smtp_server[], size_t n); int sd_dhcp_server_add_option(sd_dhcp_server *server, sd_dhcp_option *v); int sd_dhcp_server_add_vendor_option(sd_dhcp_server *server, sd_dhcp_option *v); |