From: Jonathan Tan Date: Thu, 16 Mar 2023 21:22:31 GMT Subject: Re: [PATCH v2 3/8] config.c: create config_reader and the_reader Message-ID: <20230316212231.314236-1-jonathantanmy@google.com> In-Reply-To: <4347896f0a4896efe5b1410b72f5b583ad6bd9e0.1678925506.git.gitgitgadget@gmail.com> "Glen Choo via GitGitGadget" writes: > -static inline struct config_source *config_reader_pop_source() > +static inline struct config_source *config_reader_pop_source(struct config_reader *reader) > { > struct config_source *ret; > - if (!cf_global) > + if (!reader->source) > BUG("tried to pop config source, but we weren't reading config"); > - ret = cf_global; > - cf_global = cf_global->prev; > + ret = reader->source; > + reader->source = reader->source->prev; > + /* FIXME remove this when cf is removed. */ > + cf_global = reader->source; > return ret; > } In the FIXME, it's cf_global not cf. Everything else looks good.