Skip to content

Commit

Permalink
registry2.0: Fix error reported by scan-build
Browse files Browse the repository at this point in the history
Result of 'malloc' is converted to a pointer of type 'entry_list', which is incompatible with sizeof operand type 'entry_list *'

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@117633 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
raimue committed Mar 6, 2014
1 parent e8133dd commit fcba6c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registry2.0/entry.c
Expand Up @@ -153,7 +153,7 @@ static int entry_delete(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[]) {
list_handle = Tcl_GetAssocData(interp, "registry::deleted", NULL); list_handle = Tcl_GetAssocData(interp, "registry::deleted", NULL);
if (list_handle) { if (list_handle) {
entry_list* list = *list_handle; entry_list* list = *list_handle;
*list_handle = malloc(sizeof(entry_list*)); *list_handle = malloc(sizeof(entry_list));
if (*list_handle) { if (*list_handle) {
(*list_handle)->entry = entry; (*list_handle)->entry = entry;
(*list_handle)->next = list; (*list_handle)->next = list;
Expand Down

0 comments on commit fcba6c4

Please sign in to comment.