diff options
author | obrien <obrien@FreeBSD.org> | 2007-12-31 03:42:05 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2007-12-31 03:42:05 +0000 |
commit | a836858474cf06343a6120752c21fcc279070190 (patch) | |
tree | 5b60fde31ee421070e74ed110bad9e15681c4e64 /contrib/cvs | |
parent | 6303adc70570dfec04aa17d56cd06e650fbbbf73 (diff) | |
download | FreeBSD-src-a836858474cf06343a6120752c21fcc279070190.zip FreeBSD-src-a836858474cf06343a6120752c21fcc279070190.tar.gz |
Reduce diffs to vendor's 1.11.17.
Diffstat (limited to 'contrib/cvs')
-rw-r--r-- | contrib/cvs/src/filesubr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/cvs/src/filesubr.c b/contrib/cvs/src/filesubr.c index b9f9bd5..9353888 100644 --- a/contrib/cvs/src/filesubr.c +++ b/contrib/cvs/src/filesubr.c @@ -877,7 +877,7 @@ xreadlink (link) { char *file = NULL; int buflen = BUFSIZ; - int linklen; + int link_name_len; /* Get the name of the file to which `from' is linked. FIXME: what portability issues arise here? Are readlink & @@ -886,14 +886,15 @@ xreadlink (link) { file = xrealloc (file, buflen); errno = 0; - linklen = readlink (link, file, buflen - 1); + link_name_len = readlink (link, file, buflen - 1); buflen *= 2; } - while (linklen == -1 && errno == ENAMETOOLONG); + while (link_name_len < 0 && errno == ENAMETOOLONG); - if (linklen == -1) + if (link_name_len < 0) error (1, errno, "cannot readlink %s", link); - file[linklen] = '\0'; + + file[link_name_len] = '\0'; return file; } |