summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c2
-rw-r--r--roff.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index cbcc3762..296bb5e6 100644
--- a/main.c
+++ b/main.c
@@ -789,6 +789,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
static int
mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)
{
+#if 0
struct curparse *cp;
cp = (struct curparse *)arg;
@@ -800,5 +801,6 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)
fprintf(stderr, ": %s", msg);
fputc('\n', stderr);
+#endif
return(1);
}
diff --git a/roff.c b/roff.c
index 3e298ae0..8ed21a8f 100644
--- a/roff.c
+++ b/roff.c
@@ -349,14 +349,14 @@ roff_new_ig(ROFF_ARGS)
* Merry fucking Christmas.
*/
- r->last->end = malloc((size_t)i - ppos + 1);
+ r->last->end = malloc((size_t)(i - ppos) + 1);
if (NULL == r->last->end) {
(*r->msg)(MANDOCERR_MEM, r->data, ln, ppos, NULL);
return(ROFF_ERR);
}
- memcpy(r->last->end, &(*bufp)[ppos], (size_t)i - ppos);
- r->last->end[(size_t)i - ppos] = '\0';
+ memcpy(r->last->end, &(*bufp)[ppos], (size_t)(i - ppos));
+ r->last->end[i - ppos] = '\0';
return(ROFF_IGN);
}