aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2013-11-20 01:42:29 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2013-11-20 01:42:29 +0000
commit59d74a351ffa3b22099c8b0d2f419eab6ca0de9d (patch)
tree6cac87e3535bd1ea2a68f867df32cce44e69719e /cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
parentde950c79f355a2b4c5dfb6b6ae2384066d814074 (diff)
downloadsrc-59d74a351ffa3b22099c8b0d2f419eab6ca0de9d.tar.gz
src-59d74a351ffa3b22099c8b0d2f419eab6ca0de9d.zip
Use 'int' to store the return value of getopt(), rather than char.
On some architectures (powerpc), char is unsigned by default, which means comparisons against -1 always fail, so the programs get stuck in an infinite loop. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=258362
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/plockstat/plockstat.c')
-rw-r--r--cddl/contrib/opensolaris/cmd/plockstat/plockstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
index aa2c1f9d2db9..12884682c4a5 100644
--- a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
+++ b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
@@ -778,7 +778,8 @@ main(int argc, char **argv)
#endif
int err;
int opt_C = 0, opt_H = 0, opt_p = 0, opt_v = 0;
- char c, *p, *end;
+ int c;
+ char *p, *end;
struct sigaction act;
int done = 0;