source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Even though the size of a pointer should not depend on the type
@ 2013-05-18 16:40 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2013-05-18 16:40 UTC (permalink / raw)
  To: source

Log Message:
-----------
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).

Modified Files:
--------------
    mdocml:
        chars.c

Revision Data
-------------
Index: chars.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/chars.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -Lchars.c -Lchars.c -u -p -r1.52 -r1.53
--- chars.c
+++ chars.c
@@ -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;
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-18 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-18 16:40 mdocml: Even though the size of a pointer should not depend on the type schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).