aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tar/format.h2
-rw-r--r--lib/tar/src/number.c2
-rw-r--r--lib/tar/src/read_header.c4
3 files changed, 3 insertions, 5 deletions
diff --git a/include/tar/format.h b/include/tar/format.h
index 9f60ef3..c8db967 100644
--- a/include/tar/format.h
+++ b/include/tar/format.h
@@ -89,8 +89,6 @@ typedef struct {
extern "C" {
#endif
-int read_octal(const char *str, int digits, sqfs_u64 *out);
-
int read_number(const char *str, int digits, sqfs_u64 *out);
unsigned int tar_compute_checksum(const tar_header_t *hdr);
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;