Navigation Menu

Skip to content

Commit

Permalink
io: reduce scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 17, 2015
1 parent 42925b3 commit 1a948c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/io.c
Expand Up @@ -1135,11 +1135,13 @@ grn_io_expire(grn_ctx *ctx, grn_io *io, int count_thresh, uint32_t limit)
uint32_t nref, nmaps, *pnref = &io->nref;
GRN_ATOMIC_ADD_EX(pnref, 1, nref);
if (!nref && grn_gtick - io->count > count_thresh) {
uint32_t i = io->header->n_arrays;
grn_io_mapinfo *info = io->maps;
grn_io_array_spec *array_specs = (grn_io_array_spec *)io->user_header;
while (i--) {
memset(io->ainfo[i].addrs, 0, sizeof(void *) * array_specs[i].max_n_segments);
{
uint32_t i = io->header->n_arrays;
while (i--) {
memset(io->ainfo[i].addrs, 0, sizeof(void *) * array_specs[i].max_n_segments);
}
}
for (m = io->max_map_seg; m; info++, m--) {
if (info->map) {
Expand Down

0 comments on commit 1a948c3

Please sign in to comment.