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 --- include/sqfs/xattr_writer.h | 2 +- include/str_table.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sqfs/xattr_writer.h b/include/sqfs/xattr_writer.h index 21c5179..4b93118 100644 --- a/include/sqfs/xattr_writer.h +++ b/include/sqfs/xattr_writer.h @@ -129,7 +129,7 @@ SQFS_API int sqfs_xattr_writer_end(sqfs_xattr_writer_t *xwr, sqfs_u32 *out); * * @return Zero on success, a negative @ref SQFS_ERROR value on failure. */ -SQFS_API int sqfs_xattr_writer_flush(sqfs_xattr_writer_t *xwr, +SQFS_API int sqfs_xattr_writer_flush(const sqfs_xattr_writer_t *xwr, sqfs_file_t *file, sqfs_super_t *super, sqfs_compressor_t *cmp); diff --git a/include/str_table.h b/include/str_table.h index a843e62..7ae050e 100644 --- a/include/str_table.h +++ b/include/str_table.h @@ -42,12 +42,13 @@ int str_table_get_index(str_table_t *table, const char *str, size_t *idx); /* Resolve a unique ID to the string it represents. Returns NULL if the ID is unknown, i.e. out of bounds. */ SQFS_INTERNAL -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); SQFS_INTERNAL void str_table_add_ref(str_table_t *table, size_t index); SQFS_INTERNAL void str_table_del_ref(str_table_t *table, size_t index); -SQFS_INTERNAL size_t str_table_get_ref_count(str_table_t *table, size_t index); +SQFS_INTERNAL +size_t str_table_get_ref_count(const str_table_t *table, size_t index); #endif /* STR_TABLE_H */ -- cgit v1.2.3