X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Frename.c;h=43be743db406c5589fc2ef4f45130600eecd0588;hb=1ff2f5cb0aa2b2098f6b22b8df395c6e0d12e23e;hp=067a5ac65500dc43958735783aa3042d035dbe2a;hpb=daa269958ad8d50ef8154ccb65e58acaf7a6dd99;p=debian%2Ftar diff --git a/gnu/rename.c b/gnu/rename.c index 067a5ac6..43be743d 100644 --- a/gnu/rename.c +++ b/gnu/rename.c @@ -1,8 +1,6 @@ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Work around rename bugs in some systems. - Copyright (C) 2001-2003, 2005-2006, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -287,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; @@ -464,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)