]> mj.ucw.cz Git - libucw.git/blobdiff - lib/bucket.c
Use xmalloc_zero() instead of xmalloc() followed by bzero().
[libucw.git] / lib / bucket.c
index 5ed1b4940b93bcc356dfc06891a5ce54b8caead0..6fec2a59eea69cb42766111d06e76a0136be2978 100644 (file)
@@ -115,8 +115,7 @@ obuck_init(int writeable)
   sh_off_t size;
 
   obuck_fd = open(obuck_name, (writeable ? O_RDWR | O_CREAT : O_RDONLY), 0666);
-  obuck_fb = b = xmalloc(sizeof(struct fastbuf) + buflen + OBUCK_ALIGN + 4);
-  bzero(b, sizeof(struct fastbuf));
+  obuck_fb = b = xmalloc_zero(sizeof(struct fastbuf) + buflen + OBUCK_ALIGN + 4);
   b->buflen = buflen;
   b->buffer = (char *)(b+1);
   b->bptr = b->bstop = b->buffer;