aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/chars.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-05-18 16:40:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-05-18 16:40:15 +0000
commit6c13812bad464f40c8388ccec3d3944c6d4a2cd5 (patch)
tree204c131352a8a4fcb0501ed3ea61fe8f65e5f280 /chars.c
parenta891ce70bcf9770e9cb3b5215f63eeb9d84f9242 (diff)
downloadmandoc-6c13812bad464f40c8388ccec3d3944c6d4a2cd5.tar.gz
mandoc-6c13812bad464f40c8388ccec3d3944c6d4a2cd5.tar.zst
mandoc-6c13812bad464f40c8388ccec3d3944c6d4a2cd5.zip
Even though the size of a pointer should not depend on the type of the
data pointed to, pass the size of the right pointer type to calloc; cosmetic issue reported by Ulrich Spoerlein <uqs@spoerlein.net> found in Coverity Scan CID 978734. No binary change - ok cmp(1).
Diffstat (limited to 'chars.c')
-rw-r--r--chars.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chars.c b/chars.c
index ce03347b..8b4f6b64 100644
--- a/chars.c
+++ b/chars.c
@@ -1,4 +1,4 @@
-/* $Id: chars.c,v 1.52 2011/11/08 00:15:23 kristaps Exp $ */
+/* $Id: chars.c,v 1.53 2013/05/18 16:40:15 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -77,7 +77,7 @@ mchars_alloc(void)
*/
tab = mandoc_malloc(sizeof(struct mchars));
- htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
+ htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln *));
for (i = 0; i < LINES_MAX; i++) {
hash = (int)lines[i].code[0] - PRINT_LO;