From 6790a772def36c6a40d7604d4c17d0ad50cde7aa Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 13 Sep 2014 22:39:31 +0000 Subject: [PATCH] Document that VG_(newSWA) never returns NULL (because its allocation function does not). Audit call sites. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14533 --- helgrind/libhb_core.c | 1 - include/pub_tool_sparsewa.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helgrind/libhb_core.c b/helgrind/libhb_core.c index 8101f2ae92..bd26f28a3b 100644 --- a/helgrind/libhb_core.c +++ b/helgrind/libhb_core.c @@ -4429,7 +4429,6 @@ static void event_map_init ( void ) "libhb.event_map_init.4 (oldref tree)", HG_(free) ); - tl_assert(oldrefTree); oldrefGen = 0; oldrefGenIncAt = 0; diff --git a/include/pub_tool_sparsewa.h b/include/pub_tool_sparsewa.h index a37edf7ce9..f918eb2497 100644 --- a/include/pub_tool_sparsewa.h +++ b/include/pub_tool_sparsewa.h @@ -50,7 +50,8 @@ typedef struct _SparseWA SparseWA; /* opaque */ -// Create a new one, using the specified allocator/deallocator +// Create a new one, using the specified allocator/deallocator. +// Never returns NULL. SparseWA* VG_(newSWA) ( void*(*alloc_nofail)(const HChar* cc, SizeT), const HChar* cc, void(*dealloc)(void*) ); -- 2.47.2