On Tue, Nov 27, 2018 at 8:53 AM Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> 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? In the example given here, you'd just short it to struct parse_options opts = opts_1; opts = parse_options_concat(opts, opts_2); if not for this patch. Are opts_{1,2} ever be NULL?