X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-unpack-objects.c;h=557148a693c058f51222cb3d996c309791d43d8b;hb=6d71c1dca4396de545a6c9667b3dcf0c03e42b30;hp=9a773239cabab9998bcea829c0fb2abea9bdb8e8;hpb=75b44066f3ed7cde238cdea1f0bf9e2f1744c820;p=git.git diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c index 9a773239c..557148a69 100644 --- a/builtin-unpack-objects.c +++ b/builtin-unpack-objects.c @@ -68,7 +68,7 @@ static void *fill(int min) if (ret <= 0) { if (!ret) die("early EOF"); - die("read error on input: %s", strerror(errno)); + die_errno("read error on input"); } len += ret; } while (len < min); @@ -158,7 +158,7 @@ struct obj_info { #define FLAG_WRITTEN (1u<<21) static struct obj_info *obj_list; -unsigned nr_objects; +static unsigned nr_objects; /* * Called only from check_object() after it verified this object @@ -200,7 +200,7 @@ static int check_object(struct object *obj, int type, void *data) if (fsck_object(obj, 1, fsck_error_function)) die("Error in object"); - if (!fsck_walk(obj, check_object, 0)) + if (!fsck_walk(obj, check_object, NULL)) die("Error on reachable objects of %s", sha1_to_hex(obj->sha1)); write_cached_object(obj); return 1; @@ -210,7 +210,7 @@ static void write_rest(void) { unsigned i; for (i = 0; i < nr_objects; i++) - check_object(obj_list[i].obj, OBJ_ANY, 0); + check_object(obj_list[i].obj, OBJ_ANY, NULL); } static void added_object(unsigned nr, enum object_type type, @@ -422,8 +422,8 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size, static void unpack_one(unsigned nr) { unsigned shift; - unsigned char *pack, c; - unsigned long size; + unsigned char *pack; + unsigned long size, c; enum object_type type; obj_list[nr].offset = consumed_bytes;