Hi Paul,
On 2026-02-23T14:39:30-0800, Paul Eggert wrote:
> On 2026-02-22 06:41, Alejandro Colomar wrote:
> > --- a/lib/chdir-long.c
> > +++ b/lib/chdir-long.c
> > @@ -86,8 +86,7 @@ cdb_advance_fd (struct cd_buf *cdb, char const *dir)
> > static char * _GL_ATTRIBUTE_PURE
> > find_non_slash (char const *s)
> > {
> > - size_t n_slash = strspn (s, "/");
> > - return (char *) s + n_slash;
> > + return stpspn (s, "/");
>
> I don't see how this can work, as stpspn (once fixed) returns char const *,
> not char *.> Plus, it sounds like this is not the right way to fix chdir-long > anyway: surely it should use stpspn directly, and the find_non_slash > function should be removed. I was thinking we should do that. I preferred to wait and see, before proposing too-disruptive changes. Especially, given the name might be deemed too cryptic. Cheers, Alex -- <https://www.alejandro-colomar.es>
signature.asc
Description: PGP signature
