summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-15 16:23:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-15 16:23:51 +0000
commit792762cbb772aaf51b391b8c492fc1285528dd88 (patch)
tree8886ac7ff1741e71906364d4357fc63ce7f6e2b6 /tbl_data.c
parent87d72e07e9c7935f4db2f36c4fc32716cd34b865 (diff)
downloadmandoc-792762cbb772aaf51b391b8c492fc1285528dd88.tar.gz
Make lint shut up a little bit.
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tbl_data.c b/tbl_data.c
index e125a6e9..6d86e4c0 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -106,8 +106,10 @@ data(struct tbl_node *tbl, struct tbl_span *dp,
return(0);
}
- dat->string = mandoc_malloc(*pos - sv + 1);
- memcpy(dat->string, &p[sv], *pos - sv);
+ assert(*pos - sv >= 0);
+
+ dat->string = mandoc_malloc((size_t)(*pos - sv + 1));
+ memcpy(dat->string, &p[sv], (size_t)(*pos - sv));
dat->string[*pos - sv] = '\0';
if (p[*pos])