2011-10-29 Ulrich Drepper <drepper@gmail.com>
+ * elf/chroot_canon.c (chroot_canon): Cleanups.
+
* elf/dl-lookup.c (_dl_setup_hash): Avoid warning.
[BZ #13335]
for (start = end = name; *start; start = end)
{
struct stat64 st;
- int n;
/* Skip sequence of multiple path-separators. */
while (*start == '/')
goto error;
}
- n = readlink (rpath, buf, PATH_MAX - 1);
+ ssize_t n = readlink (rpath, buf, PATH_MAX - 1);
if (n < 0)
{
if (*end == '\0')
extra_buf = alloca (PATH_MAX);
len = strlen (end);
- if ((long int) (n + len) >= PATH_MAX)
+ if (len >= PATH_MAX - n)
{
__set_errno (ENAMETOOLONG);
goto error;