diff options
author | Andy Wingo <wingo@pobox.com> | 2016-06-29 11:14:40 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-06-29 11:32:05 +0200 |
commit | 2b421e02e103027851a0fa8dd1e02088948b73f8 (patch) | |
tree | 254f2883eb63eccf22cc206a06a452a26e814e9f /lib/rename.c | |
parent | bfca4367b074e2961618dc656dd2a14339a7ef72 (diff) | |
download | guile-2b421e02e103027851a0fa8dd1e02088948b73f8.tar.gz |
Update Gnulib to 6835fc458f30b94f15d69c35a79cbc2dfabe2d06.
Diffstat (limited to 'lib/rename.c')
-rw-r--r-- | lib/rename.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rename.c b/lib/rename.c index 1cd4e6da3..53fde10a7 100644 --- a/lib/rename.c +++ b/lib/rename.c @@ -1,6 +1,6 @@ /* Work around rename bugs in some systems. - Copyright (C) 2001-2003, 2005-2006, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -285,7 +285,7 @@ rpl_rename (char const *src, char const *dst) char *dst_temp = (char *) dst; bool src_slash; bool dst_slash; - bool dst_exists; + bool dst_exists _GL_UNUSED; int ret_val = -1; int rename_errno = ENOTDIR; struct stat src_st; @@ -462,7 +462,9 @@ rpl_rename (char const *src, char const *dst) ret_val = rename (src_temp, dst_temp); rename_errno = errno; - out: + + out: _GL_UNUSED_LABEL; + if (src_temp != src) free (src_temp); if (dst_temp != dst) |