]> git.armaanb.net Git - opendoas.git/blobdiff - timestamp.c
timestamp.c: already return on 22th field of /proc/ppid/stat
[opendoas.git] / timestamp.c
index e97c92f6ea23af4ec2835dfc66a3b2d056c3bfd0..c90318dd71daf7ca6cc109ff2cad725949164ef4 100644 (file)
@@ -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"