]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
seccomp_user_notif.2: EXAMPLE: rename a variable
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 16 Oct 2020 15:08:24 +0000 (17:08 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 25 Oct 2020 21:08:30 +0000 (22:08 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/seccomp_user_notif.2

index 7190c799b82a3a5626efaad907eba73f1c36f62d..5449fd305fbe573092d73335825dc9e9008be5a4 100644 (file)
@@ -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)