diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-11-04 20:17:51 +0300 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-11-04 23:12:28 +0300 |
commit | ff8eddfb9c6b0d1ada8dd325b34baa742e87aba5 (patch) | |
tree | 09b410cf919ce95bcfaa591b2b16e8b4fabb5256 /src | |
parent | 2b65975df91d389b6c8e5584a5258669ec3680a2 (diff) |
Remove incorrect attempt to enforce binary file IO
This was done wrongly, and in any event it is the user's
responsibility to use the right mode for the OS.
Diffstat (limited to 'src')
-rw-r--r-- | src/microtar-stdio.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/microtar-stdio.c b/src/microtar-stdio.c index 4aed2a6..e95b030 100644 --- a/src/microtar-stdio.c +++ b/src/microtar-stdio.c @@ -23,7 +23,6 @@ #include "microtar.h" #include <stdio.h> -#include <string.h> static int file_read(void* stream, void* data, unsigned size) { @@ -58,11 +57,6 @@ static const mtar_ops_t file_ops = { int mtar_open(mtar_t* tar, const char* filename, const char* mode) { - /* Ensure mode is always binary */ - if(strchr(mode, 'r')) mode = "rb"; - if(strchr(mode, 'w')) mode = "wb"; - if(strchr(mode, 'a')) mode = "ab"; - /* Open file */ FILE* file = fopen(filename, mode); if(!file) |