On Mon, Apr 13, 2026 at 07:53:32PM +0200, Tim Düsterhus wrote:
> Hi
> 
> On 4/13/26 19:50, Willy Tarreau wrote:
> > > + if ((unique_id = pool_alloc(pool_head_uniqueid)) == NULL) {
> > > +         *dst = IST_NULL;
> > > + }
> > 
> > I guess you wanted to add a return statement at the end of this block.
> 
> Ah yes. I noticed myself during the review of the patch, but it seems I
> didn't properly amend the commit. Can you add the missing return during
> merging, or shall I send a v4?

No worries, I can do it. Just don't beat me in the unlikely event I
forget :-)

> > BTW, generally speaking, it's better to avoid assignments in "if"
> > conditions like this as long as possible (sometimes it's *really*
> > helpful). The point is that it usually complicates debugging, when
> 
> In this case I've just taken the existing logic and moved it elsewhere.
> Personally I find "assignment + compare against NULL" an acceptable pattern,
> but feel free to also adjust this during merging.

OK will try to keep it in mind as well.

Thanks,
Willy


Reply via email to