diff mbox series

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

Message ID 3d9fa4cd278a96af3fbf47480e63ccc175868d2b.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_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 mbox series

Patch

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) {