From fbff6127ac6e4318767bc20c6b0be3051140326a Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 19 Dec 2013 15:00:51 +0200 Subject: Files: use the new open() wrappers Adds use of everything from the new wrappers(), but the opendir() one. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 9fd44d90f..8f6dfb080 100644 --- a/file.c +++ b/file.c @@ -25,7 +25,7 @@ int readfile(const char *filename, struct memblock *mem) mem->buffer = NULL; mem->size = 0; - fd = open(filename, O_RDONLY | O_BINARY, 0); + fd = subsurface_open(filename, O_RDONLY | O_BINARY, 0); if (fd < 0) return fd; ret = fstat(fd, &st); @@ -81,7 +81,7 @@ static int try_to_open_zip(const char *filename, struct memblock *mem, char **er { int success = 0; /* Grr. libzip needs to re-open the file, it can't take a buffer */ - struct zip *zip = zip_open(filename, ZIP_CHECKCONS, NULL); + struct zip *zip = subsurface_zip_open_readonly(filename, ZIP_CHECKCONS, NULL); if (zip) { int index; @@ -93,7 +93,7 @@ static int try_to_open_zip(const char *filename, struct memblock *mem, char **er zip_fclose(file); success++; } - zip_close(zip); + subsurface_zip_close(zip); } return success; } -- cgit v1.2.3-70-g09d2