Use cmp_ok() in place of ok() with a < comparison, for better diagnostics.
[p5sagit/Devel-Size.git] / 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;
     }