In check_new(), tv can never be NULL, so assert() this.
Nicholas Clark [Thu, 14 Apr 2011 15:54:30 +0000 (16:54 +0100)]
This will simplify future refactoring.

Size.xs

diff --git a/Size.xs b/Size.xs
index 331ed6a..45a23a4 100644 (file)
--- a/Size.xs
+++ b/Size.xs
@@ -54,7 +54,8 @@ check_new(TRACKING *tv, const void *const p) {
     unsigned int  bit  = ((unsigned long)p >> ALIGN_BITS) & 0x00000007U;
     unsigned int  nop  =  (unsigned long)p & 0x3U;
     
-    if (NULL == p || NULL == tv) return FALSE;
+    assert(tv);
+    if (NULL == p) return FALSE;
     TRY_TO_CATCH_SEGV { 
         const char c = *(const char *)p;
     }