commit - 1aaa1562179ea8be813abb49d6bdb197e0eb2c60
commit + 2d6dd3ed2c8c3bfc84e2e35d7c457e035725e3cf
blob - aaa03170319bd65b941e76c4152b6d5720bdcd5a
blob + 2a33f84612d8875694cfe87b49a45f5e48c45c56
--- lib/delta_cache.c
+++ lib/delta_cache.c
continue;
if (i > 0) {
struct got_cached_delta tmp;
+
memcpy(&tmp, &head->entries[0], sizeof(tmp));
memcpy(&head->entries[0], &head->entries[i],
sizeof(head->entries[0]));
blob - 4bef4fa0fe94d62da5c1003246d35e196a4e04dc
blob + 8714b15fb6a72f69d52e8e4c6f153d56437b20ad
--- lib/pack.c
+++ lib/pack.c
&fulltext, &fulltext_len,
pack->delta_cache, delta->data_offset);
if (fulltext) {
- size_t w = fwrite(fulltext, 1, fulltext_len, outfile);
+ size_t w;
+
+ w = fwrite(fulltext, 1, fulltext_len, outfile);
if (w != fulltext_len)
return got_ferror(outfile, GOT_ERR_IO);
*result_size = fulltext_len;
accum_size = fulltext_len;
err = NULL;
} else {
- err = got_delta_apply_in_mem(base_buf, base_bufsz,
- delta_buf, delta_len, accum_buf,
- &accum_size, max_size);
+ err = got_delta_apply_in_mem(base_buf,
+ base_bufsz, delta_buf, delta_len,
+ accum_buf, &accum_size, max_size);
}
n++;
if (!cached)
pack->delta_cache,
delta_data_offset,
fulltext, fulltext_len);
- if (err && err->code != GOT_ERR_NO_SPACE)
+ if (err &&
+ err->code != GOT_ERR_NO_SPACE)
goto done;
err = NULL;
}