2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Quiet a -Wconversion warning.

This commit is contained in:
Todd C. Miller 2025-01-16 20:04:41 -07:00
parent a27b989c9c
commit a5bca1b94c

View File

@ -272,7 +272,7 @@ sudo_ttyname_dev_v1(dev_t rdev, char *buf, size_t buflen)
continue;
fdpath[sizeof("/proc/self/fd/N") - 2] = '0' + fd;
len = readlink(fdpath, buf, buflen);
len = (size_t)readlink(fdpath, buf, buflen);
if (len != (size_t)-1) {
if (len == buflen) {
errno = ERANGE; /* buf too small */