diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-27 04:46:33 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-27 04:46:33 +0000 |
commit | 27d38671cbbb51c90fe1bf0f334f72e8e84f880d (patch) | |
tree | 58434ae62ea43cc79b28e0267372bcd78f82d574 /usr.bin/sdiff | |
parent | 839ede6d424365de8b43f23ad40f16899621419f (diff) |
INT_MAX should be big enough for a width
Diffstat (limited to 'usr.bin/sdiff')
-rw-r--r-- | usr.bin/sdiff/sdiff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 448f122056f..250f7e6892b 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdiff.c,v 1.8 2005/12/27 04:43:01 tedu Exp $ */ +/* $OpenBSD: sdiff.c,v 1.9 2005/12/27 04:46:32 tedu Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -168,7 +168,7 @@ main(int argc, char **argv) break; case 'w': wflag = strtonum(optarg, WIDTH_MIN, - (MIN(SIZE_T_MAX, LLONG_MAX)), &errstr); + INT_MAX, &errstr); if (errstr) errx(2, "width is %s: %s", errstr, optarg); break; @@ -282,8 +282,7 @@ xstrtonum(const char *nptr) *ptr = '\0'; /* Parse number. */ - /* XXX - Is it safe to compare SIZE_T_MAX and LLONG_MAX? */ - n = strtonum(copy, 0, MIN(SIZE_T_MAX, LLONG_MAX), &errstr); + n = strtonum(copy, 0, INT_MAX, &errstr); if (errstr) errx(2, "line number in diff is %s: %s", errstr, nptr); |