From: Michael Kerrisk Date: Fri, 16 Oct 2020 15:08:24 +0000 (+0200) Subject: seccomp_user_notif.2: EXAMPLE: rename a variable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5486117543a3dedbf2301d0e8649d696015f7482;p=thirdparty%2Fman-pages.git seccomp_user_notif.2: EXAMPLE: rename a variable Signed-off-by: Michael Kerrisk --- diff --git a/man2/seccomp_user_notif.2 b/man2/seccomp_user_notif.2 index 7190c799b8..5449fd305f 100644 --- a/man2/seccomp_user_notif.2 +++ b/man2/seccomp_user_notif.2 @@ -1235,11 +1235,11 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd, /* 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); @@ -1252,8 +1252,8 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd, 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)