On Fri, Sep 16, 2016 at 10:27:04AM -0700, Junio C Hamano wrote:
> Heiko Voigt <hvo...@hvoigt.net> writes:
> 
> > +static struct sha1_array *get_sha1s_from_list(struct string_list 
> > *submodules,
> > +           const char *path)
> > +{
> > +   struct string_list_item *item;
> > +   struct sha1_array *hashes;
> > +
> > +   item = string_list_insert(submodules, path);
> > +   if (item->util)
> > +           return (struct sha1_array *) item->util;
> > +
> > +   hashes = (struct sha1_array *) xmalloc(sizeof(struct sha1_array));
> > +   /* NEEDSWORK: should we add an initializer function for
> > +    * sha1_array ? */
> > +   memset(hashes, 0, sizeof(struct sha1_array));
> > +   item->util = hashes;
> 
> 
>       /* NEEDSWORK: should we have SHA1_ARRAY_INIT etc.? */
>       item->util = xcalloc(1, sizeof(struct sha1_array));

Ok will do.

Reply via email to