diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-02-04 18:36:29 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-02-04 18:36:51 +0100 |
commit | 4116634f4c6599d1d390dbb71c0c138291663955 (patch) | |
tree | e499e1db4a531d0290adb3450fe66568283ce249 /lib/tar | |
parent | b621d4ed5e07cdc17fee79011c21c62cd995ae2b (diff) |
libtar: internalize the declaration of read_octal
Use read_number in the places that remain.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r-- | lib/tar/src/number.c | 2 | ||||
-rw-r--r-- | lib/tar/src/read_header.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/tar/src/number.c b/lib/tar/src/number.c index 2f179df..2de73ae 100644 --- a/lib/tar/src/number.c +++ b/lib/tar/src/number.c @@ -11,7 +11,7 @@ #include <ctype.h> #include <stdio.h> -int read_octal(const char *str, int digits, sqfs_u64 *out) +static int read_octal(const char *str, int digits, sqfs_u64 *out) { sqfs_u64 result = 0; diff --git a/lib/tar/src/read_header.c b/lib/tar/src/read_header.c index 219c9fb..1e74841 100644 --- a/lib/tar/src/read_header.c +++ b/lib/tar/src/read_header.c @@ -14,7 +14,7 @@ static bool is_checksum_valid(const tar_header_t *hdr) { sqfs_u64 read_chksum; - if (read_octal(hdr->chksum, sizeof(hdr->chksum), &read_chksum)) + if (read_number(hdr->chksum, sizeof(hdr->chksum), &read_chksum)) return false; return read_chksum == tar_compute_checksum(hdr); @@ -113,7 +113,7 @@ static int decode_header(const tar_header_t *hdr, unsigned int set_by_pax, } } - if (read_octal(hdr->mode, sizeof(hdr->mode), &field)) + if (read_number(hdr->mode, sizeof(hdr->mode), &field)) return -1; out->mode = field & 07777; |