Browse Source

bugfix ptrs

Leon Urbas 11 years ago
parent
commit
6e9d7592f0
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/ua_namespace.c
  2. 1 1
      tests/check_namespace.c

+ 1 - 1
src/ua_namespace.c

@@ -438,7 +438,7 @@ static UA_Int32 expand (namespace *ns) {
 	nindex = higher_prime_index (count * 2);
 	nsize = prime_tab[nindex].prime;
 
-	if (UA_alloc((void *)nentries, sizeof(ns_entry)*nsize) != UA_SUCCESS)
+	if (UA_alloc((void **)&nentries, sizeof(ns_entry)*nsize) != UA_SUCCESS)
 		return UA_ERR_NO_MEMORY;
 	ns->entries = nentries;
 	ns->size = nsize;

+ 1 - 1
tests/check_namespace.c

@@ -44,7 +44,7 @@ START_TEST(findNodeInNamespaceWithSingleEntry) {
 	retval = get_node(ns,&(n1->nodeId),&nr,&nl);
 	// then
 	ck_assert_int_eq(retval, UA_SUCCESS);
-	ck_assert_ptr_eq(nr,&n1);
+	ck_assert_ptr_eq(nr,n1);
 	// finally
 	delete_ns(ns);
 }