From: Nicholas Clark Date: Thu, 14 Apr 2011 15:54:30 +0000 (+0100) Subject: In check_new(), tv can never be NULL, so assert() this. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7089796d3c88758e1be965bbdbf35056e4196ad1;p=p5sagit%2FDevel-Size.git In check_new(), tv can never be NULL, so assert() this. This will simplify future refactoring. --- diff --git a/Size.xs b/Size.xs index 331ed6a..45a23a4 100644 --- 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; }