From: Toon Claes Date: Wed, 29 Oct 2025 13:01:42 GMT Subject: Re: [PATCH v2] last-modified: implement faster algorithm Message-ID: <87ldktrhe1.fsf@iotcl.com> In-Reply-To: Taylor Blau writes: > I am not saying that we should continue to write "if (0 <= k)", since we > will clearly never take the else branch. I am trying to say that > path_idx() *could* return (size_t)-1, and callers would be able to write > "if (k == (size_t)-1)" to check for that error condition. > > My observation was that there are unlikely to be so many active paths at > any one time such that we'd ever want to return (size_t)-1 as a valid > index, and could always use it as an error sentinel. Yes, I agree. If the list grows to (size_t)-1 entries, I think we also run into other issues. Anyhow, in the v3 I've submitted, I resolved it differently so no awkward type cast is needed. -- Cheers, Toon