From 6c13812bad464f40c8388ccec3d3944c6d4a2cd5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 18 May 2013 16:40:15 +0000 Subject: 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 found in Coverity Scan CID 978734. No binary change - ok cmp(1). --- chars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chars.c') 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 * Copyright (c) 2011 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451