summaryrefslogtreecommitdiff
path: root/lib/sqfs/meta_writer.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 18:43:07 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 18:43:07 +0200
commitcdb1c79153b2b1377fa0ca7e1beda2b6b9b2c687 (patch)
tree18217e4bdff2e4e37adccbb7e078623f4fac3e6b /lib/sqfs/meta_writer.c
parent40232f4bd4d7e8e001f7d1e8f120606f59b2c147 (diff)
Remove use of ssize_t from library API
ssize_t is only available on POSIX platforms and even there it is only defined to hold at least -1 in the range of negative numbers. This commit replaces ssize_t return types with sqfs_s32 and the coresponding function arguments with sqfs_u32. Because the range of positiv numbers for a signed 32 bit number is only half that of the unsigned version, additional checks have to be added. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/meta_writer.c')
-rw-r--r--lib/sqfs/meta_writer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/meta_writer.c b/lib/sqfs/meta_writer.c
index a5ce366..3cf3e3e 100644
--- a/lib/sqfs/meta_writer.c
+++ b/lib/sqfs/meta_writer.c
@@ -89,8 +89,8 @@ void sqfs_meta_writer_destroy(sqfs_meta_writer_t *m)
int sqfs_meta_writer_flush(sqfs_meta_writer_t *m)
{
meta_block_t *outblk;
- size_t count;
- ssize_t ret;
+ sqfs_u32 count;
+ sqfs_s32 ret;
if (m->offset == 0)
return 0;