From: Phillip Wood Date: Thu, 30 Jun 2022 12:38:45 GMT Subject: Re: [PATCH 3/3] xdiff: introduce XDL_ALLOC_GROW() Message-ID: <0a1650bf-a7f5-0cc5-e6c9-0e02d1f542bf@gmail.com> In-Reply-To: <5734b393-57c8-dc63-282e-221ee1937351@gmail.com> On 30/06/2022 13:03, Phillip Wood wrote: > On 30/06/2022 11:54, Ævar Arnfjörð Bjarmason wrote: >> >> On Wed, Jun 29 2022, Phillip Wood via GitGitGadget wrote: >> >>> From: Phillip Wood >>> >>> Add a helper to grow an array. This is analogous to ALLOC_GROW() in >>> the rest of the codebase but returns −1 on allocation failure to >>> accommodate other users of libxdiff such as libgit2. >> >> Urm, does it? I just skimmed this, so maybe I missed something, but I >> don't see where you changed the definition of xdl_malloc(), >> xdl_realloc() etc. Oh I think I might have misunderstood your question. For git.git it will still die() but for other users that arrange for xdl_realloc() to return NULL on failure it will return -1. The same applies to the comments in the previous two patches about XDL_[CM]ALLOC_ARRAY() returning NULL on allocation failure. Best Wishes Phillip