Return to rcs.c CVS log | Up to [local] / src / usr.bin / rcs |
version 1.78, 2011/07/14 16:38:39 | version 1.79, 2012/03/03 08:34:27 | ||
---|---|---|---|
|
|
||
FILE *src, *dst; | FILE *src, *dst; | ||
size_t nread, nwritten; | size_t nread, nwritten; | ||
char *buf; | char *buf; | ||
int ret; | |||
ret = -1; | |||
if (rename(from, to) == 0) { | if (rename(from, to) == 0) { | ||
if (chmod(to, perm) == -1) { | if (chmod(to, perm) == -1) { | ||
warn("%s", to); | warn("%s", to); | ||
|
|
||
} | } | ||
} | } | ||
ret = 0; | |||
(void)unlink(from); | (void)unlink(from); | ||
out: | out: | ||
|
|
||
(void)fclose(dst); | (void)fclose(dst); | ||
xfree(buf); | xfree(buf); | ||
return (ret); | return (0); | ||
} | } | ||
/* | /* |