[117634] trunk/base/src/cregistry/entry.c
raimue at macports.org
raimue at macports.org
Thu Mar 6 03:33:25 PST 2014
Revision: 117634
https://trac.macports.org/changeset/117634
Author: raimue at macports.org
Date: 2014-03-06 03:33:25 -0800 (Thu, 06 Mar 2014)
Log Message:
-----------
cregistry: Fix error reported by scan-build
Result of 'malloc' is converted to a pointer of type 'reg_entry *', which is incompatible with sizeof operand type 'void *'
Modified Paths:
--------------
trunk/base/src/cregistry/entry.c
Modified: trunk/base/src/cregistry/entry.c
===================================================================
--- trunk/base/src/cregistry/entry.c 2014-03-06 11:29:59 UTC (rev 117633)
+++ trunk/base/src/cregistry/entry.c 2014-03-06 11:33:25 UTC (rev 117634)
@@ -1268,7 +1268,7 @@
int entry_space = 10;
Tcl_HashEntry* hash;
Tcl_HashSearch search;
- *entries = malloc(10*sizeof(void*));
+ *entries = malloc(entry_space * sizeof(reg_entry*));
if (!*entries) {
return -1;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140306/60f5ee0a/attachment.html>
More information about the macports-changes
mailing list