From e8473e7e58a3622a07ea42d56bb3f338c960990e Mon Sep 17 00:00:00 2001 From: albert <> Date: Mon, 30 Sep 2002 22:31:21 +0000 Subject: [PATCH] 2.5.xx allows 32-bit PID --- ps/parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ps/parser.c b/ps/parser.c index f3f671bd..1e92be24 100644 --- a/ps/parser.c +++ b/ps/parser.c @@ -75,13 +75,13 @@ static const char *get_opt_arg(void){ static const char *parse_pid(char *str, sel_union *ret){ char *endp; - int num; + unsigned long num; static const char *pidrange = "Process ID out of range."; static const char *pidsyntax = "Process ID list syntax error."; - num = strtol(str, &endp, 0); - if(*endp != '\0') return pidsyntax; - if(num>0x7fff) return pidrange; /* Linux PID limit */ - if(num<1) return pidrange; + num = strtoul(str, &endp, 0); + if(*endp != '\0') return pidsyntax; + if(num<1) return pidrange; + if(num > 0x7fffffffUL) return pidrange; ret->pid = num; return 0; }