blockFile

Save data in chunked in blocks in a file for creating databases
git clone https://noulin.net/git/blockFile.git
Log | Files | Refs | LICENSE

commit 2e4ded80da4c3b5d97efd802731ca1dc85edd7b9
parent 693d7a0b7c14f8d03ad979935a690caacc398238
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun,  8 Aug 2021 12:07:33 +0000

check return values

blockFile.c | 10 +++++-----
package.yml |  2 +-
2 files changed, 6 insertions(+), 6 deletions(-)

Diffstat:
MblockFile.c | 10+++++-----
Mpackage.yml | 2+-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/blockFile.c b/blockFile.c @@ -165,7 +165,7 @@ internal bool openBlockFile(blockFilet *self, const char *filename) { memcpy(blockBuf, &b0, sizeof b0); - writeFile(filename, blockBuf, fil.blockSize); + pError0(writeFile(filename, blockBuf, fil.blockSize)); } fil.f = fopen(filename, "r+"); if (!fil.f) pFuncError; @@ -216,8 +216,8 @@ internal void deleteBlockFile(blockFilet *self) { closeBlockFile(self); // remove file and freeF - rmAll(s1); - rmAll(s2); + pError0(rmAll(s1)); + pError0(rmAll(s2)); freeManyS(s1, s2); } @@ -228,8 +228,8 @@ internal void deleteFBlockFile(char *filename) { char *s = catS(filename, "x"); // remove file and freeF - rmAll(filename); - rmAll(s); + pError0(rmAll(filename)); + pError0(rmAll(s)); free(s); } diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: blockFile - version: 0.0.9 + version: 0.0.10 description: Save data in chunked in blocks in a file for creating databases bin: ./blockFile.c repository: