Skip to content
Permalink
Browse files

cregistry: Fix error reported by scan-build

Result of 'malloc' is converted to a pointer of type 'reg_file *', which is incompatible with sizeof operand type 'void *'

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@117632 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
raimue committed Mar 6, 2014
1 parent d9fa7a0 commit e8133dd951ed199081dfcee8ffbb4ab4e079ec70
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cregistry/file.c
@@ -336,7 +336,7 @@ int reg_all_open_files(reg_registry* reg, reg_file*** files) {
int file_space = 10;
Tcl_HashEntry* hash;
Tcl_HashSearch search;
*files = malloc(10 * sizeof(void*));
*files = malloc(file_space * sizeof(reg_file*));
if (!*files) {
return -1;
}

0 comments on commit e8133dd

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