diff -r 461be4cd34a3 -r e944453ca924 src/dirbuf.c --- a/src/dirbuf.c Mon Oct 13 02:27:59 2008 +0300 +++ b/src/dirbuf.c Wed Oct 15 01:14:22 2008 +0300 @@ -6,7 +6,9 @@ #include "lib/math.h" int dirbuf_init (struct dirbuf *buf, size_t req_size, off_t req_off) { + buf->buf = NULL; buf->len = req_size; + buf->off = 0; buf->req_off = req_off; DEBUG("\tdirbuf.init: req_size=%zu", req_size); @@ -40,7 +42,7 @@ size_t ent_size; DEBUG("\tdirbuf.add: req_off=%zu, buf->len=%zu, buf->off=%zu, ent_off=%zu, next_off=%zu, ent_name=`%s`, ent_ino=%lu, ent_mode=%07o", - req_off, buf->len, buf->off, ent_off, next_off, ent_name, ent_ino, ent_mode); + buf->req_off, buf->len, buf->off, ent_off, next_off, ent_name, ent_ino, ent_mode); // skip entries as needed if (ent_off < buf->req_off)