Changed leb128 related functions to operate on uint32_t
So unsigned instead of signed. The original intention of using int32_t was to hint that the sign bit should be reserved, but this may just confuse if our leb128 encoding has a sign representation, which it does not.
This commit is contained in:
+2
-2
@@ -344,9 +344,9 @@ static inline uint32_t lfs_fromle32_(const void *buffer) {
|
||||
|
||||
// Convert to/from leb128 encoding
|
||||
// TODO should we really be using ssize_t here and not lfs_ssize_t?
|
||||
ssize_t lfs_toleb128(int32_t word, void *buffer, size_t size);
|
||||
ssize_t lfs_toleb128(uint32_t word, void *buffer, size_t size);
|
||||
|
||||
ssize_t lfs_fromleb128(int32_t *word, const void *buffer, size_t size);
|
||||
ssize_t lfs_fromleb128(uint32_t *word, const void *buffer, size_t size);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user