mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
One small change to make the code clearer in update.
This commit is contained in:
parent
73a9cb0a32
commit
372f57fadf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45
@ -435,15 +435,15 @@ update_filesdone_proc (err, repository, update_dir)
|
||||
char from[PATH_MAX], to[PATH_MAX];
|
||||
|
||||
/* Read all the link pairs from the symlinks file */
|
||||
while (fgets(from, PATH_MAX, links)) {
|
||||
fgets(to, PATH_MAX, links);
|
||||
while (fgets(to, PATH_MAX, links)) {
|
||||
fgets(from, PATH_MAX, links);
|
||||
|
||||
/* Strip off the newlines */
|
||||
to[strlen(to) - 1] = '\0';
|
||||
from[strlen(from) - 1] = '\0';
|
||||
|
||||
/* Do it */
|
||||
if (symlink(to, from) == -1) {
|
||||
if (symlink(from, to) == -1) {
|
||||
error (0, errno, "Unable to create symlink `%s'", to);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user