]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
unlinkat: fix GNU/Hurd typo
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Aug 2025 05:01:14 +0000 (22:01 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Aug 2025 05:01:14 +0000 (22:01 -0700)
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2025-08/msg00041.html
* lib/unlinkat.c (rpl_unlinkat): Declare missing local.

lib/unlinkat.c

index 6873ba558da548de58e63c7350e39ea2cbf454cc..72bee75b0b54191fb9762e6aa09db4f3187379f1 100644 (file)
@@ -71,6 +71,7 @@ rpl_unlinkat (int fd, char const *name, int flag)
           memcpy (short_name, name, len);
           while (len && ISSLASH (short_name[len - 1]))
             short_name[--len] = '\0';
+          char linkbuf[1];
           if (len && (readlinkat (fd, short_name, linkbuf, 1) < 0
                       || errno == EINVAL))
             {