diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-20 21:29:29 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-20 21:29:29 +0000 |
commit | 16bb9f263ca4c8015cd2b9ae9b78922a9fb190d3 (patch) | |
tree | cb6f0d37b81518c8086d1054cc8b5a9a876e326a | |
parent | 005888a175a280443f563b25ba9e548f81c58ef9 (diff) | |
download | mandoc-16bb9f263ca4c8015cd2b9ae9b78922a9fb190d3.tar.gz |
Casting fix.
-rw-r--r-- | main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -271,12 +271,12 @@ fdesc(struct buf *blk, struct buf *ln, * growable, hence passed in by ptr-ptr. */ - if (-1 == fstat(fd, &st)) { + sz = BUFSIZ; + + if (-1 == fstat(fd, &st)) warnx("%s", f); - sz = BUFSIZ; - } else - sz = (unsigned)BUFSIZ > st.st_blksize ? - (size_t)BUFSIZ : st.st_blksize; + else if ((size_t)st.st_blksize > sz) + sz = st.st_blksize; if (sz > blk->sz) { blk->buf = realloc(blk->buf, sz); |