summaryrefslogtreecommitdiffstats
path: root/mmain.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 19:32:03 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 19:32:03 +0000
commitafb2dbb6cd0e0214f352338c0abb880d02986242 (patch)
tree656e4abac4e2a6b649818cf07363b2d85af3e3f3 /mmain.c
parent7d74d4d5bc960b47e735e4f9539eb4b01e227f66 (diff)
downloadmandoc-afb2dbb6cd0e0214f352338c0abb880d02986242.tar.gz
Fixed strings.sh to work with NetBSD.
Fixed various lint warnings.
Diffstat (limited to 'mmain.c')
-rw-r--r--mmain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mmain.c b/mmain.c
index c823901f..e8df8dbd 100644
--- a/mmain.c
+++ b/mmain.c
@@ -41,7 +41,7 @@ struct mmain {
int dbg; /* Debug level. */
struct mdoc *mdoc; /* Active parser. */
char *buf; /* Input buffer. */
- u_long bufsz; /* Input buffer size. */
+ size_t bufsz; /* Input buffer size. */
char *in; /* Input file name. */
int fdin; /* Input file desc. */
int pflags; /* Parse flags. */
@@ -190,7 +190,7 @@ mmain_mdoc(struct mmain *p)
warn("%s", p->in);
p->bufsz = BUFSIZ;
} else
- p->bufsz = MAX(st.st_blksize, BUFSIZ);
+ p->bufsz = (size_t)MAX(st.st_blksize, BUFSIZ);
p->buf = malloc(p->bufsz);
if (NULL == p->buf)
@@ -283,7 +283,7 @@ parse(struct mmain *p)
for (i = 0; i < (int)sz; i++) {
if (pos >= len) {
len += MD_LINE_SZ;
- line = realloc(line, len);
+ line = realloc(line, (size_t)len);
if (NULL == line)
err(1, "realloc");
}