Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
/* Read bytes at the location containing the pathname argument
(i.e., the first argument) of the mkdir(2) call */
- ssize_t s = pread(procMemFd, path, len, req\->data.args[0]);
- if (s == \-1)
+ ssize_t nread = pread(procMemFd, path, len, req\->data.args[0]);
+ if (nread == \-1)
errExit("pread");
- if (s == 0) {
+ if (nread == 0) {
fprintf(stderr, "\etS: pread() of /proc/PID/mem "
"returned 0 (EOF)\en");
exit(EXIT_FAILURE);
than the target. */
int zeroIdx = len \- 1;
- if (s < zeroIdx)
- zeroIdx = s;
+ if (nread < zeroIdx)
+ zeroIdx = nread;
path[zeroIdx] = \(aq\0\(aq;
if (close(procMemFd) == \-1)