diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2009-06-07 13:15:14 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2009-06-07 13:15:14 +0000 |
commit | ab387c53d9319689c89abb7234066f222c87fa44 (patch) | |
tree | 36ffd79c4a779da86e084dda66276a9c29dedc7d | |
parent | 6098bf109e3a7e220f1b6e71b86bf43c4612eb27 (diff) |
Use SIZE_MAX, not SIZE_T_MAX.
-rw-r--r-- | usr.bin/sdiff/sdiff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/sdiff/sdiff.c b/usr.bin/sdiff/sdiff.c index 1d4cf163d5d..e9a840f8fd6 100644 --- a/usr.bin/sdiff/sdiff.c +++ b/usr.bin/sdiff/sdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdiff.c,v 1.26 2009/06/07 13:09:24 ray Exp $ */ +/* $OpenBSD: sdiff.c,v 1.27 2009/06/07 13:15:13 ray Exp $ */ /* * Written by Raymond Lai <ray@cyth.net>. @@ -285,7 +285,7 @@ main(int argc, char **argv) /* Subtract column divider and divide by two. */ width = (wflag - 3) / 2; /* Make sure line_width can fit in size_t. */ - if (width > (SIZE_T_MAX - 3) / 2) + if (width > (SIZE_MAX - 3) / 2) errx(2, "width is too large: %zu", width); line_width = width * 2 + 3; @@ -385,7 +385,7 @@ printcol(const char *s, size_t *col, const size_t col_max) * If rounding to next multiple of eight causes * an integer overflow, just return. */ - if (*col > SIZE_T_MAX - 8) + if (*col > SIZE_MAX - 8) return; /* Round to next multiple of eight. */ @@ -646,7 +646,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) if (file1start != file1end) errx(2, "append cannot have a file1 range: %s", line); - if (file1start == SIZE_T_MAX) + if (file1start == SIZE_MAX) errx(2, "file1 line range too high: %s", line); file1start = ++file1end; } @@ -658,7 +658,7 @@ parsecmd(FILE *diffpipe, FILE *file1, FILE *file2) if (file2start != file2end) errx(2, "delete cannot have a file2 range: %s", line); - if (file2start == SIZE_T_MAX) + if (file2start == SIZE_MAX) errx(2, "file2 line range too high: %s", line); file2start = ++file2end; } |