Clean up code. Add comments. Init module with callback to register all
[bertos.git] / bertos / io / kblock_posix.c
index 57c2ee8c7838a5218e81ef75c4082239ccf8a285..eefea0d10e58c3e953ff77b22a81fed1d156f771 100644 (file)
@@ -53,7 +53,7 @@ static int kblockposix_load(KBlock *b, block_idx_t index)
 
 static int kblockposix_store(struct KBlock *b, block_idx_t index)
 {
-       KBlockPosix *f = kblockposix_CAST(b);
+       KBlockPosix *f = KBLOCKPOSIX_CAST(b);
        fseek(f->fp, index * b->blk_size, SEEK_SET);
        return (fwrite(f->b.priv.buf, 1, b->blk_size, f->fp) == b->blk_size) ? 0 : EOF;
 }
@@ -95,11 +95,10 @@ static int kblockposix_error(struct KBlock *b)
 }
 
 
-static int kblockposix_claererr(struct KBlock *b)
+static void kblockposix_claererr(struct KBlock *b)
 {
        KBlockPosix *f = KBLOCKPOSIX_CAST(b);
        clearerr(f->fp);
-       return 0;
 }