]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove a few pointless asserts because the allocation functions
authorFlorian Krohm <florian@eich-krohm.de>
Thu, 18 Sep 2014 18:24:20 +0000 (18:24 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Thu, 18 Sep 2014 18:24:20 +0000 (18:24 +0000)
do not return NULL.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14552

coregrind/m_redir.c

index 5aec0b3e4f1d44ec8091b7a46a28001dfc252808..c0c6338e06db9f74649dd93ed975c67386be65eb 100644 (file)
@@ -593,11 +593,8 @@ void VG_(redir_notify_new_DebugInfo)( DebugInfo* newdi )
          }
 
          spec = dinfo_zalloc("redir.rnnD.1", sizeof(Spec));
-         vg_assert(spec);
          spec->from_sopatt = dinfo_strdup("redir.rnnD.2", demangled_sopatt);
          spec->from_fnpatt = dinfo_strdup("redir.rnnD.3", demangled_fnpatt);
-         vg_assert(spec->from_sopatt);
-         vg_assert(spec->from_fnpatt);
          spec->to_addr = sym_avmas.main;
          spec->isWrap = isWrap;
          spec->becTag = becTag;
@@ -661,7 +658,6 @@ void VG_(redir_notify_new_DebugInfo)( DebugInfo* newdi )
    /* Ok.  Now specList holds the list of specs from the DebugInfo.
       Build a new TopSpec, but don't add it to topSpecs yet. */
    newts = dinfo_zalloc("redir.rnnD.4", sizeof(TopSpec));
-   vg_assert(newts);
    newts->next    = NULL; /* not significant */
    newts->seginfo = newdi;
    newts->specs   = specList;
@@ -1175,11 +1171,9 @@ static void add_hardwired_spec (const  HChar* sopatt, const HChar* fnpatt,
                                 const HChar** mandatory )
 {
    Spec* spec = dinfo_zalloc("redir.ahs.1", sizeof(Spec));
-   vg_assert(spec);
 
    if (topSpecs == NULL) {
       topSpecs = dinfo_zalloc("redir.ahs.2", sizeof(TopSpec));
-      vg_assert(topSpecs);
       /* symtab_zalloc sets all fields to zero */
    }
 
@@ -1508,7 +1502,6 @@ static void* dinfo_zalloc(const HChar* ec, SizeT n) {
    void* p;
    vg_assert(n > 0);
    p = VG_(arena_malloc)(VG_AR_DINFO, ec, n);
-   vg_assert(p);
    VG_(memset)(p, 0, n);
    return p;
 }