diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-07 16:24:38 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-07 16:25:38 +0200 |
commit | 86e5c9c242380957c253971ce638deddd54d5b9e (patch) | |
tree | 0b7643363a295d04966995ea367a9308fb1ae7a4 | |
parent | e21bf0b60c1b9d67fe7553105b6440c3fce7c0bb (diff) |
Cleanup: consistent, fixed size data types for generic flag fields
Instead of using int or unsigned int for generic function flag
arguments, consistently use an unsigned, fixed size type.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r-- | include/sqfs/dir_reader.h | 2 | ||||
-rw-r--r-- | include/sqfs/dir_writer.h | 2 | ||||
-rw-r--r-- | include/sqfs/io.h | 2 | ||||
-rw-r--r-- | include/sqfs/meta_writer.h | 2 | ||||
-rw-r--r-- | lib/sqfs/dir_writer.c | 2 | ||||
-rw-r--r-- | lib/sqfs/io_file.c | 2 | ||||
-rw-r--r-- | lib/sqfs/meta_writer.c | 4 |
7 files changed, 8 insertions, 8 deletions
diff --git a/include/sqfs/dir_reader.h b/include/sqfs/dir_reader.h index ec84d98..389da6b 100644 --- a/include/sqfs/dir_reader.h +++ b/include/sqfs/dir_reader.h @@ -308,7 +308,7 @@ SQFS_API int sqfs_dir_reader_find_by_path(sqfs_dir_reader_t *rd, SQFS_API int sqfs_dir_reader_get_full_hierarchy(sqfs_dir_reader_t *rd, const sqfs_id_table_t *idtbl, const char *path, - unsigned int flags, + sqfs_u32 flags, sqfs_tree_node_t **out); /** diff --git a/include/sqfs/dir_writer.h b/include/sqfs/dir_writer.h index bb09a86..81a651c 100644 --- a/include/sqfs/dir_writer.h +++ b/include/sqfs/dir_writer.h @@ -95,7 +95,7 @@ SQFS_API void sqfs_dir_writer_destroy(sqfs_dir_writer_t *writer); * * @return Zero on success, a @ref E_SQFS_ERROR value on failure. */ -SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u16 flags); +SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u32 flags); /** * @brief Add add a directory entry. diff --git a/include/sqfs/io.h b/include/sqfs/io.h index 866389b..1108a61 100644 --- a/include/sqfs/io.h +++ b/include/sqfs/io.h @@ -140,7 +140,7 @@ extern "C" { * @return A pointer to a file object on success, NULL on allocation failure, * failure to open the file or if an unknown flag was set. */ -SQFS_API sqfs_file_t *sqfs_open_file(const char *filename, int flags); +SQFS_API sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags); #ifdef __cplusplus } diff --git a/include/sqfs/meta_writer.h b/include/sqfs/meta_writer.h index 21842fb..cf8e16c 100644 --- a/include/sqfs/meta_writer.h +++ b/include/sqfs/meta_writer.h @@ -85,7 +85,7 @@ extern "C" { */ SQFS_API sqfs_meta_writer_t *sqfs_meta_writer_create(sqfs_file_t *file, sqfs_compressor_t *cmp, - int flags); + sqfs_u32 flags); /** * @brief Destroy a meta data writer and free all memory used by it. diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c index 5ce29b6..ff5faa7 100644 --- a/lib/sqfs/dir_writer.c +++ b/lib/sqfs/dir_writer.c @@ -105,7 +105,7 @@ void sqfs_dir_writer_destroy(sqfs_dir_writer_t *writer) free(writer); } -int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u16 flags) +int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u32 flags) { sqfs_u32 offset; sqfs_u64 block; diff --git a/lib/sqfs/io_file.c b/lib/sqfs/io_file.c index b07ae24..f93af4d 100644 --- a/lib/sqfs/io_file.c +++ b/lib/sqfs/io_file.c @@ -107,7 +107,7 @@ static int stdio_truncate(sqfs_file_t *base, sqfs_u64 size) } -sqfs_file_t *sqfs_open_file(const char *filename, int flags) +sqfs_file_t *sqfs_open_file(const char *filename, sqfs_u32 flags) { sqfs_file_stdio_t *file; int open_mode, temp; diff --git a/lib/sqfs/meta_writer.c b/lib/sqfs/meta_writer.c index 5db4fe7..ee92b3b 100644 --- a/lib/sqfs/meta_writer.c +++ b/lib/sqfs/meta_writer.c @@ -41,7 +41,7 @@ struct sqfs_meta_writer_t { /* The raw data chunk that data is appended to */ sqfs_u8 data[SQFS_META_BLOCK_SIZE]; - int flags; + sqfs_u32 flags; meta_block_t *list; meta_block_t *list_end; }; @@ -56,7 +56,7 @@ static int write_block(sqfs_file_t *file, meta_block_t *outblk) sqfs_meta_writer_t *sqfs_meta_writer_create(sqfs_file_t *file, sqfs_compressor_t *cmp, - int flags) + sqfs_u32 flags) { sqfs_meta_writer_t *m; |