aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/sqfs/xattr_writer.h2
-rw-r--r--include/str_table.h5
2 files changed, 4 insertions, 3 deletions
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 */