* lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
Add goto to use a label, to silence picky compilers.
2017-07-30 Paul Eggert <eggert@cs.ucla.edu>
+ renameat2: port better to older Solaris
+ * lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
+ Add goto to use a label, to silence picky compilers.
+
fts-tests: port to gcc -Wwrite-strings
* tests/test-fts.c (base, base_d): New static vars.
(argv, remove_tree, main): Use them.
/* See the lengthy comment in rename.c why Solaris 9 is forced to
GNU behavior, while Solaris 10 is left with POSIX behavior,
regarding symlinks with trailing slash. */
+ ret_val = -1;
if (src_slash)
{
src_temp = strdup (src);
ret_val = renameat (fd1, src_temp, fd2, dst_temp);
rename_errno = errno;
+ goto out;
out:
if (src_temp != src)
free (src_temp);