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.


Reply via email to