Skip to content
Permalink
Browse files

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 *'

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@117634 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
raimue committed Mar 6, 2014
1 parent fcba6c4 commit 5d5648f609f2d0fbbfd6125f5da44a56eb8126a6
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cregistry/entry.c
@@ -1268,7 +1268,7 @@ int reg_all_open_entries(reg_registry* reg, reg_entry*** entries) {
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;
}

0 comments on commit 5d5648f

Please sign in to comment.
You can’t perform that action at this time.