diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2005-01-10 20:19:46 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2005-01-10 20:19:46 +0000 |
commit | eda4dfd49060ff1ec738bb9062d6dc64b1e6e8ea (patch) | |
tree | 98f3f072882c98d0c30f49d193e6a430dfa8105e /usr.bin/tail/misc.c | |
parent | 86d764422f7001cedf0e24839f9d742ece580c17 (diff) | |
download | FreeBSD-src-eda4dfd49060ff1ec738bb9062d6dc64b1e6e8ea.zip FreeBSD-src-eda4dfd49060ff1ec738bb9062d6dc64b1e6e8ea.tar.gz |
Cast size_t to off_t before adding them to avoid warnings on the alpha.
Use %ld and intmax_t for printing an off_t.
Diffstat (limited to 'usr.bin/tail/misc.c')
-rw-r--r-- | usr.bin/tail/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tail/misc.c b/usr.bin/tail/misc.c index c2f1883..584e3d1 100644 --- a/usr.bin/tail/misc.c +++ b/usr.bin/tail/misc.c @@ -79,7 +79,7 @@ mapprint(struct mapinfo *mip, off_t startoff, off_t len) while (len > 0) { if (startoff < mip->mapoff || startoff >= mip->mapoff + - mip->maplen) { + (off_t)mip->maplen) { if (maparound(mip, startoff) != 0) return (1); } @@ -107,7 +107,7 @@ maparound(struct mapinfo *mip, off_t offset) mip->mapoff = offset & ~((off_t)TAILMAPLEN - 1); mip->maplen = TAILMAPLEN; - if (mip->maplen > mip->maxoff - mip->mapoff) + if ((off_t)mip->maplen > mip->maxoff - mip->mapoff) mip->maplen = mip->maxoff - mip->mapoff; if (mip->maplen <= 0) abort(); |