#include "fsck.h"
static int dry_run, quiet, recover, has_errors, strict;
#include "fsck.h"
static int dry_run, quiet, recover, has_errors, strict;
/* We always read in 4kB chunks. */
static unsigned char buffer[4096];
static unsigned int offset, len;
static off_t consumed_bytes;
/* We always read in 4kB chunks. */
static unsigned char buffer[4096];
static unsigned int offset, len;
static off_t consumed_bytes;
if (min > sizeof(buffer))
die("cannot fill %d bytes", min);
if (offset) {
if (min > sizeof(buffer))
die("cannot fill %d bytes", min);
if (offset) {
- obj_list = xmalloc(nr_objects * sizeof(*obj_list));
- memset(obj_list, 0, nr_objects * sizeof(*obj_list));
+ obj_list = xcalloc(nr_objects, sizeof(*obj_list));
for (i = 0; i < nr_objects; i++) {
unpack_one(i);
display_progress(progress, i + 1);
for (i = 0; i < nr_objects; i++) {
unpack_one(i);
display_progress(progress, i + 1);
- SHA1_Update(&ctx, buffer, offset);
- SHA1_Final(sha1, &ctx);
+ git_SHA1_Update(&ctx, buffer, offset);
+ git_SHA1_Final(sha1, &ctx);