aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/unix/sysv/linux/pidfd_getpid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/pidfd_getpid.c b/sysdeps/unix/sysv/linux/pidfd_getpid.c
index ebcbe8f..6967477 100644
--- a/sysdeps/unix/sysv/linux/pidfd_getpid.c
+++ b/sysdeps/unix/sysv/linux/pidfd_getpid.c
@@ -74,8 +74,10 @@ parse_fdinfo (const char *l, void *arg)
/* Ignore invalid large values. */
if (INT_MULTIPLY_WRAPV (10, n, &n)
- || INT_ADD_WRAPV (n, *l++ - '0', &n))
+ || INT_ADD_WRAPV (n, *l - '0', &n))
return -1;
+
+ l++;
}
/* -1 indicates that the process is terminated. */