From ec5ba7eb521626a85d2ab22e97eb1298b2ff6f55 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 9 Jun 2020 06:51:31 +0200 Subject: Cleanup: mark sqfs_xattr_writer_flush writer argument as const It does not make any changes to the writer itself, so mark it as const. This also requires some similar changes to the string table. Signed-off-by: David Oberhollenzer --- lib/util/str_table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/util') diff --git a/lib/util/str_table.c b/lib/util/str_table.c index cea34dc..1463546 100644 --- a/lib/util/str_table.c +++ b/lib/util/str_table.c @@ -189,7 +189,7 @@ fail_oom: return SQFS_ERROR_ALLOC; } -const char *str_table_get_string(str_table_t *table, size_t index) +const char *str_table_get_string(const str_table_t *table, size_t index) { if (index >= table->num_strings) return NULL; @@ -197,7 +197,7 @@ const char *str_table_get_string(str_table_t *table, size_t index) return table->strings[index]; } -static str_bucket_t *bucket_by_index(str_table_t *table, size_t index) +static str_bucket_t *bucket_by_index(const str_table_t *table, size_t index) { str_bucket_t *bucket = NULL; sqfs_u32 hash; @@ -229,7 +229,7 @@ void str_table_del_ref(str_table_t *table, size_t index) bucket->refcount -= 1; } -size_t str_table_get_ref_count(str_table_t *table, size_t index) +size_t str_table_get_ref_count(const str_table_t *table, size_t index) { str_bucket_t *bucket = bucket_by_index(table, index); -- cgit v1.2.3