]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
xar: Return uint64_T from atol8
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 13 May 2026 16:03:10 +0000 (18:03 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 13 May 2026 18:42:49 +0000 (20:42 +0200)
The result of atol8 is cast to mode_t, which is also unsigned.
This brings atol8 closer to atol10.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_support_format_xar.c

index 37a0f6dad54f0bff514cf3614650527d821c434d..12f89bcae539c5423575d356d00002c5c6528141 100644 (file)
@@ -388,7 +388,7 @@ static int  rd_contents_init(struct archive_read *,
 static int     rd_contents(struct archive_read *, const void **,
                    size_t *, size_t *, uint64_t);
 static uint64_t        atol10(const char *, size_t);
-static int64_t atol8(const char *, size_t);
+static uint64_t        atol8(const char *, size_t);
 static size_t  atohex(unsigned char *, size_t, const char *, size_t);
 static time_t  parse_time(const char *p, size_t n);
 static int     heap_add_entry(struct archive_read *a,
@@ -1089,10 +1089,10 @@ atol10(const char *p, size_t char_cnt)
        return (l);
 }
 
-static int64_t
+static uint64_t
 atol8(const char *p, size_t char_cnt)
 {
-       int64_t l;
+       uint64_t l;
        int digit;
 
        if (char_cnt == 0)