diff mbox series

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

Message ID 01ee6574eb0a05aaabbe757d452e562237ee1add.1738800116.git.gerickson@nuovations.com (mailing list archive)
State Under Review
Headers show
Series Correct Provisioning Database Tags Matching Behavior | expand

Commit Message

Grant Erickson Feb. 6, 2025, 12:34 a.m. UTC
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 mbox series

Patch

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)