summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-09 06:51:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-09 06:51:31 +0200
commitec5ba7eb521626a85d2ab22e97eb1298b2ff6f55 (patch)
treee23054b1182a8d79172fed5360a6fc26380eb5c5 /lib/util
parent322f6069de6c5e460a0c3b253d36b90ac30bef70 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/str_table.c6
1 files changed, 3 insertions, 3 deletions
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);