- if (file->stat_info->sparse_map == NULL)
- {
- file->stat_info->sparse_map =
- xmalloc (SPARSES_INIT_COUNT * sizeof file->stat_info->sparse_map[0]);
- file->stat_info->sparse_map_size = SPARSES_INIT_COUNT;
- }
- else if (file->stat_info->sparse_map_avail == file->stat_info->sparse_map_size)
- {
- file->stat_info->sparse_map_size *= 2;
- file->stat_info->sparse_map =
- xrealloc (file->stat_info->sparse_map,
- file->stat_info->sparse_map_size
- * sizeof file->stat_info->sparse_map[0]);
- }
- file->stat_info->sparse_map[file->stat_info->sparse_map_avail++] = *sp;
+ struct sp_array *sparse_map = st->sparse_map;
+ size_t avail = st->sparse_map_avail;
+ if (avail == st->sparse_map_size)
+ st->sparse_map = sparse_map =
+ x2nrealloc (sparse_map, &st->sparse_map_size, sizeof *sparse_map);
+ sparse_map[avail] = *sp;
+ st->sparse_map_avail = avail + 1;