[procps] [PATCH] Fix pwdx argument parsing.

  • From: Andrej Kruták <dev@xxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Tue, 12 Jun 2012 16:14:21 +0200

On some architectures/gcc's, the pwdx tool doesn't compile right because of
bad type of a variable. Afterwards pwdx can't be persuaded work. Use int as
the type, like the other tools (like pgrep) do.

---
 pwdx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pwdx.c b/pwdx.c
index e83187c..4aee389 100644
--- a/pwdx.c
+++ b/pwdx.c
@@ -63,7 +63,7 @@ int check_pid_argument(char *input)

 int main(int argc, char *argv[])
 {
-    char ch;
+    int ch;
     int retval = 0, i;
     int alloclen = 128;
     char *pathbuf;
-- 
1.7.9.5

Other related posts: