[PATCH 2/5] provisiondb: Const-qualify '__get_contexts'.

Grant Erickson <[email protected]> Wed, 5 Feb 2025 16:34:43 -0800
Newsgroups dev.linux.lists.ofono
Message-ID <01ee6574eb0a05aaabbe757d452e562237ee1add.1738800116.git.gerickson@nuovations.com>
Const-qualify the pdb argument of '__get_contexts' 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 8a71978b8afe..4a7f1bb6ef6e 100644
--- a/src/provisiondb.c
+++ b/src/provisiondb.c
@@ -236,7 +236,7 @@ static bool tags_match(char **tags_filter, const char *tags)
 	return false;
 }
 
-static int __get_contexts(struct provision_db *pdb, uint64_t offset,
+static int __get_contexts(struct provision_db const *pdb, uint64_t offset,
 				char **tags_filter,
 				struct provision_db_entry **contexts,
 				size_t *n_contexts)
-- 
2.45.0