Skip to content

Commit 9a4fc01

Browse files
committed
further changes
1 parent d6c26b3 commit 9a4fc01

5 files changed

Lines changed: 17 additions & 14 deletions

File tree

.idea/editor.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Default.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

include/tar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void tar_files_free(tar_files files);
3333

3434
#ifndef LITE
3535

36-
tar_files* tar_read(char* archiveName);
36+
tar_files* tar_read(const char* archiveName);
3737

3838
#endif
3939

src/tar.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ tar_file tar_parse_file(unsigned char* archive, size_t pos)
7979
return file;
8080
}
8181

82-
int actprefixlen = prefixlen > 0 ? prefixlen + 1 : 0;
82+
size_t actprefixlen = prefixlen > 0 ? prefixlen + 1 : 0;
8383
file.name = malloc(namelen + actprefixlen + 1);
8484

8585
if(file.name == NULL)
@@ -225,7 +225,7 @@ tar_files tar_filter_files(tar_files tarFiles)
225225
return (tar_files) {files, count};
226226
}
227227

228-
inline void tar_file_free(tar_file file)
228+
inline void tar_file_free(const tar_file file)
229229
{
230230
free(file.name);
231231
}
@@ -239,10 +239,10 @@ void tar_files_free(tar_files files)
239239

240240
free(files.files);
241241
}
242+
//
243+
// #ifndef LITE
242244

243-
#ifndef LITE
244-
245-
tar_files* tar_read(char* archiveName)
245+
tar_files* tar_read(const char* archiveName)
246246
{
247247
FILE* file = fopen(archiveName, "rb");
248248

0 commit comments

Comments
 (0)