Revision 81320947

View differences:

src/Cache/topocache.c
273 273
  }
274 274

  
275 275
  for (n = 0; n < c1->current_size; n++) {
276
    if (new_cache->metadata_size) {
277
      memcpy(new_cache->metadata, c1->metadata + n * c1->metadata_size, c1->metadata_size);
278
    }
279 276
    new_cache->entries[new_cache->current_size].id = nodeid_dup(c1->entries[n].id);
280 277
    new_cache->entries[new_cache->current_size++].timestamp = c1->entries[n].timestamp;
281 278
  }
279
  if (new_cache->metadata_size) {
280
    memcpy(new_cache->metadata, c1->metadata, c1->metadata_size * c1->current_size);
281
  }
282 282

  
283 283
  return new_cache;
284 284
}

Also available in: Unified diff