From 78c1c0f2a99df80678fbff77911b498c5311dcc0 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Fri, 6 Dec 2019 02:45:22 +0100 Subject: [PATCH] timestamp.c: already return on 22th field of /proc/ppid/stat this is the last field we are interested in and if we didn't reach it, return an error. --- timestamp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/timestamp.c b/timestamp.c index e97c92f..c90318d 100644 --- a/timestamp.c +++ b/timestamp.c @@ -141,13 +141,11 @@ proc_info(pid_t pid, int *ttynr, unsigned long long *starttime) if (p == ep || (errno == ERANGE && *starttime == ULLONG_MAX)) return -1; - break; + return 0; } - if (n == 23) - break; } - return 0; + return -1; } #else #error "proc_info not implemented" -- 2.39.2