diff options
Diffstat (limited to 'e2fsprogs/ext2fs/icount.c')
-rw-r--r-- | e2fsprogs/ext2fs/icount.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/e2fsprogs/ext2fs/icount.c b/e2fsprogs/ext2fs/icount.c index 7ae2a5c0f..7d0d63c91 100644 --- a/e2fsprogs/ext2fs/icount.c +++ b/e2fsprogs/ext2fs/icount.c | |||
@@ -112,10 +112,6 @@ errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, unsigned int size, | |||
112 | } | 112 | } |
113 | 113 | ||
114 | bytes = (size_t) (icount->size * sizeof(struct ext2_icount_el)); | 114 | bytes = (size_t) (icount->size * sizeof(struct ext2_icount_el)); |
115 | #if 0 | ||
116 | printf("Icount allocated %d entries, %d bytes.\n", | ||
117 | icount->size, bytes); | ||
118 | #endif | ||
119 | retval = ext2fs_get_mem(bytes, &icount->list); | 115 | retval = ext2fs_get_mem(bytes, &icount->list); |
120 | if (retval) | 116 | if (retval) |
121 | goto errout; | 117 | goto errout; |
@@ -172,9 +168,6 @@ static struct ext2_icount_el *insert_icount_el(ext2_icount_t icount, | |||
172 | } | 168 | } |
173 | if (new_size < (icount->size + 100)) | 169 | if (new_size < (icount->size + 100)) |
174 | new_size = icount->size + 100; | 170 | new_size = icount->size + 100; |
175 | #if 0 | ||
176 | printf("Reallocating icount %d entries...\n", new_size); | ||
177 | #endif | ||
178 | retval = ext2fs_resize_mem((size_t) icount->size * | 171 | retval = ext2fs_resize_mem((size_t) icount->size * |
179 | sizeof(struct ext2_icount_el), | 172 | sizeof(struct ext2_icount_el), |
180 | (size_t) new_size * | 173 | (size_t) new_size * |
@@ -224,15 +217,9 @@ static struct ext2_icount_el *get_icount_el(ext2_icount_t icount, | |||
224 | icount->cursor = 0; | 217 | icount->cursor = 0; |
225 | if (ino == icount->list[icount->cursor].ino) | 218 | if (ino == icount->list[icount->cursor].ino) |
226 | return &icount->list[icount->cursor++]; | 219 | return &icount->list[icount->cursor++]; |
227 | #if 0 | ||
228 | printf("Non-cursor get_icount_el: %u\n", ino); | ||
229 | #endif | ||
230 | low = 0; | 220 | low = 0; |
231 | high = (int) icount->count-1; | 221 | high = (int) icount->count-1; |
232 | while (low <= high) { | 222 | while (low <= high) { |
233 | #if 0 | ||
234 | mid = (low+high)/2; | ||
235 | #else | ||
236 | if (low == high) | 223 | if (low == high) |
237 | mid = low; | 224 | mid = low; |
238 | else { | 225 | else { |
@@ -249,7 +236,6 @@ static struct ext2_icount_el *get_icount_el(ext2_icount_t icount, | |||
249 | (highval - lowval); | 236 | (highval - lowval); |
250 | mid = low + ((int) (range * (high-low))); | 237 | mid = low + ((int) (range * (high-low))); |
251 | } | 238 | } |
252 | #endif | ||
253 | if (ino == icount->list[mid].ino) { | 239 | if (ino == icount->list[mid].ino) { |
254 | icount->cursor = mid+1; | 240 | icount->cursor = mid+1; |
255 | return &icount->list[mid]; | 241 | return &icount->list[mid]; |