From 9fbdba0957a3d9c398b8b547faa884bc82ed9cfd Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Sat, 28 May 2016 05:27:12 +0200 Subject: [PATCH] network: Add "const" to the getter argument types --- src/network.c | 12 ++++++------ src/network.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/network.c b/src/network.c index 48fa151e..7b250316 100644 --- a/src/network.c +++ b/src/network.c @@ -234,32 +234,32 @@ struct network *network_create(struct netdev *device, return network; } -const char *network_get_ssid(struct network *network) +const char *network_get_ssid(const struct network *network) { return network->ssid; } -struct netdev *network_get_netdev(struct network *network) +struct netdev *network_get_netdev(const struct network *network) { return network->netdev; } -const char *network_get_path(struct network *network) +const char *network_get_path(const struct network *network) { return network->object_path; } -enum security network_get_security(struct network *network) +enum security network_get_security(const struct network *network) { return network->security; } -const unsigned char *network_get_psk(struct network *network) +const unsigned char *network_get_psk(const struct network *network) { return network->psk; } -struct l_settings *network_get_settings(struct network *network) +struct l_settings *network_get_settings(const struct network *network) { return network->settings; } diff --git a/src/network.h b/src/network.h index 23831ea9..06fb9f1b 100644 --- a/src/network.h +++ b/src/network.h @@ -32,12 +32,12 @@ struct network *network_create(struct netdev *device, uint8_t *ssid, uint8_t ssid_len, enum security security); -const char *network_get_ssid(struct network *network); -struct netdev *network_get_netdev(struct network *network); -const char *network_get_path(struct network *network); -enum security network_get_security(struct network *network); -const unsigned char *network_get_psk(struct network *network); -struct l_settings *network_get_settings(struct network *network); +const char *network_get_ssid(const struct network *network); +struct netdev *network_get_netdev(const struct network *network); +const char *network_get_path(const struct network *network); +enum security network_get_security(const struct network *network); +const unsigned char *network_get_psk(const struct network *network); +struct l_settings *network_get_settings(const struct network *network); bool network_settings_load(struct network *network); void network_settings_close(struct network *network);