From: Vincent Pit Date: Thu, 19 Aug 2010 10:47:16 +0000 (+0200) Subject: SvREFCNT_dec already checks if the SV is non null X-Git-Tag: v0.44~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=adf120e73939cd4f80d358bbead5dd79808ae3d9;p=perl%2Fmodules%2FVariable-Magic.git SvREFCNT_dec already checks if the SV is non null --- diff --git a/Magic.xs b/Magic.xs index 0d6359e..0e9ff74 100644 --- a/Magic.xs +++ b/Magic.xs @@ -447,26 +447,26 @@ STATIC void vmg_mgwiz_free(pTHX_ MGWIZ *w) { if (!w) return; - if (w->cb_data) SvREFCNT_dec(w->cb_data); - if (w->cb_get) SvREFCNT_dec(w->cb_get); - if (w->cb_set) SvREFCNT_dec(w->cb_set); - if (w->cb_len) SvREFCNT_dec(w->cb_len); - if (w->cb_clear) SvREFCNT_dec(w->cb_clear); - if (w->cb_free) SvREFCNT_dec(w->cb_free); + SvREFCNT_dec(w->cb_data); + SvREFCNT_dec(w->cb_get); + SvREFCNT_dec(w->cb_set); + SvREFCNT_dec(w->cb_len); + SvREFCNT_dec(w->cb_clear); + SvREFCNT_dec(w->cb_free); #if MGf_COPY - if (w->cb_copy) SvREFCNT_dec(w->cb_copy); + SvREFCNT_dec(w->cb_copy); #endif /* MGf_COPY */ #if 0 /* MGf_DUP */ - if (w->cb_dup) SvREFCNT_dec(w->cb_dup); + SvREFCNT_dec(w->cb_dup); #endif /* MGf_DUP */ #if MGf_LOCAL - if (w->cb_local) SvREFCNT_dec(w->cb_local); + SvREFCNT_dec(w->cb_local); #endif /* MGf_LOCAL */ #if VMG_UVAR - if (w->cb_fetch) SvREFCNT_dec(w->cb_fetch); - if (w->cb_store) SvREFCNT_dec(w->cb_store); - if (w->cb_exists) SvREFCNT_dec(w->cb_exists); - if (w->cb_delete) SvREFCNT_dec(w->cb_delete); + SvREFCNT_dec(w->cb_fetch); + SvREFCNT_dec(w->cb_store); + SvREFCNT_dec(w->cb_exists); + SvREFCNT_dec(w->cb_delete); #endif /* VMG_UVAR */ Safefree(w->vtbl);