commit - f7a026c46d9d66483e01a412330978fb70c4427e
commit + d0d910f20669b8cbde05166600ec5afc19d1d998
blob - a671e0d9a139fda4a7595ab20adc7b3d85006678
blob + 54acac999b8b3b27ea1be492b1f61a0735e5b5fe
--- 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 - 07f931d1c925ce8921b8afdc3c488c8fa5a66b64
blob + f3e180ba1cfad139c059b9e530ad62bbfa86e5cb
--- 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;
}