From df26e6d772458ce4b8437a7e1de3de626980cd03 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 6 Nov 2022 14:23:35 +0100 Subject: [PATCH] Rename minitar_read_file to minitar_read_file_contents --- src/tar.c | 5 +++-- src/util.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tar.c b/src/tar.c index aa41f44..74af097 100644 --- a/src/tar.c +++ b/src/tar.c @@ -4,11 +4,12 @@ #include #include +// all of these are defined in util.c int minitar_read_header(struct minitar*, struct tar_header*); int minitar_validate_header(struct tar_header*); void minitar_parse_tar_header(struct tar_header*, struct minitar_entry_metadata*); struct minitar_entry* minitar_dup_entry(struct minitar_entry*); -char* minitar_read_file(struct minitar_entry_metadata*, struct minitar*); +char* minitar_read_file_contents(struct minitar_entry_metadata*, struct minitar*); struct minitar* minitar_open(const char* pathname) { @@ -48,7 +49,7 @@ static struct minitar_entry* minitar_attempt_read_entry(struct minitar* mp, int* } *valid = 1; minitar_parse_tar_header(&hdr, &entry.metadata); - char* buf = minitar_read_file(&entry.metadata, mp); + char* buf = minitar_read_file_contents(&entry.metadata, mp); if (!buf) return NULL; entry.ptr = buf; return minitar_dup_entry(&entry); diff --git a/src/util.c b/src/util.c index 4bdd8e7..a821e21 100644 --- a/src/util.c +++ b/src/util.c @@ -89,7 +89,7 @@ struct minitar_entry* minitar_dup_entry(struct minitar_entry* original) return new; } -char* minitar_read_file(struct minitar_entry_metadata* metadata, struct minitar* mp) +char* minitar_read_file_contents(struct minitar_entry_metadata* metadata, struct minitar* mp) { char* buf = malloc(metadata->size + 1); if (!buf) return NULL;