From: Duy Nguyen Date: Thu, 07 Jun 2018 17:35:37 GMT Subject: Re: [PATCH 05/23] midx: write header information to lockfile Message-ID: In-Reply-To: <20180607140338.32440-6-dstolee@microsoft.com> On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: > +static char *get_midx_filename(const char *object_dir) > +{ > + struct strbuf midx_name = STRBUF_INIT; > + strbuf_addstr(&midx_name, object_dir); > + strbuf_addstr(&midx_name, "/pack/multi-pack-index"); > + return strbuf_detach(&midx_name, NULL); > +} I think this whole function can be written as xstrfmt("%s/pack/multi-pack-index", object_dir); > + > +static size_t write_midx_header(struct hashfile *f, > + unsigned char num_chunks, > + uint32_t num_packs) > +{ > + char byte_values[4]; unsigned char just to be on the safe side? 'char' is signed on ARM if I remember correctly. -- Duy