]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
seccomp_unotify.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>
Wed, 9 Jun 2021 22:40:17 +0000 (10:40 +1200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/seccomp_unotify.2

index f4d91c89acc783c6d4325f39768f6c8048e3d545..59583a6aa759287002b48b3a350513f45390fe8c 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)