[PATCH 1/5] provisiondb: Const-qualify '__get_string'.

Grant Erickson <[email protected]> Wed, 5 Feb 2025 16:34:42 -0800
Newsgroups dev.linux.lists.ofono
Message-ID <3d9fa4cd278a96af3fbf47480e63ccc175868d2b.1738800116.git.gerickson@nuovations.com>
Const-qualify the pdb argument of '__get_string' to make it clear to
the compiler, static analyzers, and human readers that the function
is strictly a getter with no pdb argument mutation side effects.
---
 src/provisiondb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/provisiondb.c b/src/provisiondb.c
index 6a913d8d1540..8a71978b8afe 100644
--- a/src/provisiondb.c
+++ b/src/provisiondb.c
@@ -204,7 +204,7 @@ static struct provision_data *__get_provision_data(struct node *node)
 	return ((void *) node) + sizeof(struct node);
 }
 
-static int __get_string(struct provision_db *pdb, uint64_t offset,
+static int __get_string(struct provision_db const *pdb, uint64_t offset,
 				const char **out_str)
 {
 	if (!offset) {
-- 
2.45.0