]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Weaken assertion on calloc.
authorJulian Seward <jseward@acm.org>
Wed, 1 May 2002 00:10:28 +0000 (00:10 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 1 May 2002 00:10:28 +0000 (00:10 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@179

coregrind/vg_malloc2.c
vg_malloc2.c

index 8b6c6213b7245faa68f4819de066fc9e057b62bd..98d62bc912751d9db16fb5ed9bf51bc1f1e0d88f 100644 (file)
@@ -1178,7 +1178,7 @@ void* VG_(calloc) ( ArenaId aid, Int nmemb, Int nbytes )
    Int    i, size;
    UChar* p;
    size = nmemb * nbytes;
-   vg_assert(size > 0);
+   vg_assert(size >= 0);
    p = VG_(malloc) ( aid, size );
    for (i = 0; i < size; i++) p[i] = 0;
    return p;
index 8b6c6213b7245faa68f4819de066fc9e057b62bd..98d62bc912751d9db16fb5ed9bf51bc1f1e0d88f 100644 (file)
@@ -1178,7 +1178,7 @@ void* VG_(calloc) ( ArenaId aid, Int nmemb, Int nbytes )
    Int    i, size;
    UChar* p;
    size = nmemb * nbytes;
-   vg_assert(size > 0);
+   vg_assert(size >= 0);
    p = VG_(malloc) ( aid, size );
    for (i = 0; i < size; i++) p[i] = 0;
    return p;