Re: [PATCH v2 09/12] attr: (re)introduce git_check_attr() and struct git_attr_check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> This field is unused, and git_attr_check_initl() neglects to
> initialize it (if it is intended to be used in the future).

There are two patterns to use the new API:

 - initl() variant is "initialize it once, never extend"; it is very
   much deliberate.  This is used by the majority of current
   callers, that know that they want a fixed set of attributes and
   can say what attributes they want upfront.

 - alloc then append variant will use the usual ALLOC_GROW() pattern
   with nr/alloc.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]