Re: [PATCH v2 1/7] parse-options: allow parse_options_concat(NULL, options)
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Nov 28, 2018, 15:22 UTC
- Message-ID
- <CACsJy8BMkQZ=VEGCwKb2q==eqovMnGy+szitpAkn6LTQaFq+=A@mail.gmail.com>
- In-Reply-To
- <CAGZ79kYXYzS6mHJWSkC-gAj_Ts2z8-jCX9tuTenKE+bxTgbtHw@mail.gmail.com>
On Tue, Nov 27, 2018 at 8:44 PM Stefan Beller <sbeller@google.com> wrote:
Show 16 quoted lines
> > On Tue, Nov 27, 2018 at 8:53 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote: > > > > There is currently no caller that calls this function with "a" being > > NULL. But it will be introduced shortly. It is used to construct the > > option array from scratch, e.g. > > > > struct parse_options opts = NULL; > > opts = parse_options_concat(opts, opts_1); > > opts = parse_options_concat(opts, opts_2); > > While this addresses the immediate needs, I'd prefer to think > about the API exposure of parse_options_concat, > (related: do we want to have docs in its header file?) > and I'd recommend to make it symmetrical, i.e. > allow the second argument to also be NULL?
I'll just drop this patch. There's a better way to do the same without adding special handling like this.
-- Duy