From: Julian Seward Date: Fri, 5 Sep 2014 20:29:10 +0000 (+0000) Subject: evh__new_mem_heap: get rid of pointless conditional. Spotted by X-Git-Tag: svn/VALGRIND_3_10_0~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07067e0f6101f95c6461e1a2e4bf5d29f64e8c48;p=thirdparty%2Fvalgrind.git evh__new_mem_heap: get rid of pointless conditional. Spotted by Coverity and Florian Krohm. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14472 --- diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 46f64e3901..ef31041404 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -1794,12 +1794,8 @@ void evh__new_mem_heap ( Addr a, SizeT len, Bool is_inited ) { if (SHOW_EVENTS >= 1) VG_(printf)("evh__new_mem_heap(%p, %lu, inited=%d)\n", (void*)a, len, (Int)is_inited ); - // FIXME: this is kinda stupid - if (is_inited) { - shadow_mem_make_New(get_current_Thread(), a, len); - } else { - shadow_mem_make_New(get_current_Thread(), a, len); - } + // We ignore the initialisation state (is_inited); that's ok. + shadow_mem_make_New(get_current_Thread(), a, len); if (len >= SCE_BIGRANGE_T && (HG_(clo_sanity_flags) & SCE_BIGRANGE)) all__sanity_check("evh__pre_mem_read-post"); }