summaryrefslogtreecommitdiffstats
path: root/contrib/cvs
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2007-12-31 03:42:05 +0000
committerobrien <obrien@FreeBSD.org>2007-12-31 03:42:05 +0000
commita836858474cf06343a6120752c21fcc279070190 (patch)
tree5b60fde31ee421070e74ed110bad9e15681c4e64 /contrib/cvs
parent6303adc70570dfec04aa17d56cd06e650fbbbf73 (diff)
downloadFreeBSD-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.c11
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;
}
OpenPOWER on IntegriCloud