]> granicus.if.org Git - procps-ng/commitdiff
Fix pwdx argument parsing
authorAndrej Kruták <dev@andree.sk>
Thu, 14 Jun 2012 12:33:49 +0000 (22:33 +1000)
committerCraig Small <csmall@enc.com.au>
Thu, 14 Jun 2012 12:33:49 +0000 (22:33 +1000)
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 to work. Use int as the type, like the other tools
(like pgrep) do.

Signed-off-by: Craig Small <csmall@enc.com.au>
pwdx.c

diff --git a/pwdx.c b/pwdx.c
index e83187c9c78a4db32c4447974fa2384e5a5b29b3..4aee389bea99f74f58f3d78818967571bd53019a 100644 (file)
--- 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;