Re: [PATCH 1/4] string-list: allow passing NULL for `get_entry_index`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 9, 2025, 06:22 UTC
- Message-ID
- <aL_HuZUF_cCtrADS@pks.im>
- In-Reply-To
- <aL217NTO73Xn9dJD@ArchLinux>
On Mon, Sep 08, 2025 at 12:42:20AM +0800, shejialuo wrote:
Show 8 quoted lines
> Callers of `get_entry_index()` are required to pass a non-NULL > `exact_match` parameter to receive information about whether an exact > match is found. However, in some cases, callers only need the index > position. > > Let's allow callers to pass NULL for the `exact_match` parameter > when they don't need this information, reducing unnecessary variable > declarations in calling code.
It would be nice to either explain why we want this or, alternatively, to include that specific user in the same patch.
Patrick