diff mbox series

[2/4] service: Const-qualify 'lookup_gateway_data'.

Message ID 20231207234130.1093617-3-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series connection: Harmonize Search Function Names and Document Search Functions | expand

Commit Message

Grant Erickson Dec. 7, 2023, 11:41 p.m. UTC
Const-qualify the gateway configuration argument of
'lookup_gateway_data' to make it clear to the compiler, static
analyzers, and human readers that the function is strictly a getter
with no gateway configuration mutation side effects.
---
 src/connection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/connection.c b/src/connection.c
index c74dd0741995..c42988bf337d 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -216,7 +216,8 @@  static struct gateway_config *find_gateway(int index, const char *gateway)
 	return NULL;
 }
 
-static struct gateway_data *lookup_gateway_data(struct gateway_config *config)
+static struct gateway_data *lookup_gateway_data(
+				const struct gateway_config *config)
 {
 	GHashTableIter iter;
 	gpointer value, key;