Merge branch 'nd/qsort-in-merge-recursive'
[gitweb.git] / builtin / cat-file.c
index cca97a86c0b1d1029936184f72ed6a20e97da759..30383e9eb4befb31e0d165d5863615484bcc9da3 100644 (file)
@@ -53,7 +53,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
        char *buf;
        unsigned long size;
        struct object_context obj_context;
-       struct object_info oi = {NULL};
+       struct object_info oi = OBJECT_INFO_INIT;
        struct strbuf sb = STRBUF_INIT;
        unsigned flags = LOOKUP_REPLACE_OBJECT;
        const char *path = force_path;
@@ -449,8 +449,7 @@ static int batch_objects(struct batch_options *opt)
                data.split_on_whitespace = 1;
 
        if (opt->all_objects) {
-               struct object_info empty;
-               memset(&empty, 0, sizeof(empty));
+               struct object_info empty = OBJECT_INFO_INIT;
                if (!memcmp(&data.info, &empty, sizeof(empty)))
                        data.skip_object_info = 1;
        }