mirror of https://github.com/mkerrisk/man-pages
seccomp_unotify.2: EXAMPLE: rename a variable
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
2f37aeb620
commit
47056412d7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue