X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Size.xs;h=4fed28853704314066b3c1d2683d37dcd5cec40e;hb=e5c69bdd973a9534e92dc99f49cb497a14b1da50;hp=d274230a7532c6d00480708c9f93019203b60bea;hpb=c1bfd7dae61a91bcc4e6b34a9c989cefe51c89ae;p=p5sagit%2FDevel-Size.git diff --git a/Size.xs b/Size.xs index d274230..4fed288 100644 --- a/Size.xs +++ b/Size.xs @@ -312,13 +312,12 @@ magic_size(const SV * const thing, struct state *st) { magic_pointer = SvMAGIC(thing); /* Have we seen the magic pointer? */ - while (magic_pointer && check_new(st, magic_pointer)) { + while (check_new(st, magic_pointer)) { st->total_size += sizeof(MAGIC); TRY_TO_CATCH_SEGV { /* Have we seen the magic vtable? */ - if (magic_pointer->mg_virtual && - check_new(st, magic_pointer->mg_virtual)) { + if (check_new(st, magic_pointer->mg_virtual)) { st->total_size += sizeof(MGVTBL); } @@ -659,10 +658,8 @@ thing_size(pTHX_ const SV * const orig_thing, struct state *st) { st->total_size += GvNAMELEN(thing); #ifdef GvFILE /* Is there a file? */ - if (GvFILE(thing)) { - if (check_new(st, GvFILE(thing))) { - st->total_size += strlen(GvFILE(thing)); - } + if (check_new(st, GvFILE(thing))) { + st->total_size += strlen(GvFILE(thing)); } #endif /* Is there something hanging off the glob? */