X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-null.c;h=5d1649206991e98108614460ca0045a936c2525c;hb=bc5f818d21b7aceaf2c0e263b00aa4295211d8f9;hp=6f0a40a217ba74df600a9186bcfb46a617d0a96a;hpb=2668e862ad13dfb955249939f2b61aaee05c949c;p=libucw.git diff --git a/ucw/fb-null.c b/ucw/fb-null.c index 6f0a40a2..5d164920 100644 --- a/ucw/fb-null.c +++ b/ucw/fb-null.c @@ -17,10 +17,11 @@ static void fbnull_close(struct fastbuf *b) xfree(b); } -struct fastbuf *fbnull_open(uns bufsize) +struct fastbuf *fbnull_open(uint bufsize) { struct fastbuf *b = xmalloc(sizeof(*b) + bufsize); bzero(b, sizeof(*b)); + b->name = ""; b->close = fbnull_close; fbnull_start(b, (byte *)(b + 1), bufsize); return b; @@ -44,7 +45,7 @@ static int fbnull_seek(struct fastbuf *b, ucw_off_t pos, int whence) return 1; } -void fbnull_start(struct fastbuf *b, byte *buf, uns bufsize) +void fbnull_start(struct fastbuf *b, byte *buf, uint bufsize) { ASSERT(buf && bufsize); b->pos = btell(b); @@ -65,7 +66,7 @@ bool fbnull_test(struct fastbuf *b) int main(void) { struct fastbuf *b = fbnull_open(7); - for (uns i = 0; i < 100; i++) + for (uint i = 0; i < 100; i++) { if (btell(b) != i * 10) ASSERT(0);