X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-atomic.c;h=a29e758b62283cc2e9a29f96440714d4e515736e;hb=0efb089d44b263d9f39aee96f22e74534da5cc60;hp=cd0217468279090b61ea69a19f816715254eecd9;hpb=a85f2b54f6b334a9b5eb79302c99ea135f071875;p=libucw.git diff --git a/ucw/fb-atomic.c b/ucw/fb-atomic.c index cd021746..a29e758b 100644 --- a/ucw/fb-atomic.c +++ b/ucw/fb-atomic.c @@ -17,13 +17,14 @@ #include #include -static uns trace; +static uint trace; #ifndef TEST static struct cf_section fbatomic_config = { CF_ITEMS { - CF_UNS("Trace", &trace) + CF_UINT("Trace", &trace), + CF_END } }; @@ -41,7 +42,7 @@ struct fb_atomic_file { int fd; int use_count; int record_len; - uns locked; + uint locked; byte name[1]; }; @@ -71,8 +72,8 @@ fbatomic_spout(struct fastbuf *f) struct fb_atomic *F = FB_ATOMIC(f); if (F->af->locked) { - uns written = f->bptr - f->buffer; - uns size = f->bufend - f->buffer + F->slack_size; + uint written = f->bptr - f->buffer; + uint size = f->bufend - f->buffer + F->slack_size; F->slack_size *= 2; TRACE("Reallocating buffer for atomic file %s with slack %d", f->name, F->slack_size); f->buffer = xrealloc(f->buffer, size); @@ -100,7 +101,7 @@ fbatomic_close(struct fastbuf *f) } struct fastbuf * -fbatomic_open(const char *name, struct fastbuf *master, uns bufsize, int record_len) +fbatomic_open(const char *name, struct fastbuf *master, uint bufsize, int record_len) { struct fb_atomic *F = xmalloc_zero(sizeof(*F)); struct fastbuf *f = &F->fb;