From: Vincent Pit Date: Mon, 11 Aug 2008 15:38:50 +0000 (+0200) Subject: Remove the possibly miscompiled syntax ((hints == 2) ? croak : warn)(msg) X-Git-Tag: v0.02~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c6c476d4e2dc387c3e89301b087da67251ae2e05;p=perl%2Fmodules%2Findirect.git Remove the possibly miscompiled syntax ((hints == 2) ? croak : warn)(msg) --- diff --git a/indirect.xs b/indirect.xs index 1e546d6..6909bf4 100644 --- a/indirect.xs +++ b/indirect.xs @@ -203,9 +203,13 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) { goto done; pm = indirect_map_fetch(om, &svm); po = indirect_map_fetch(oo, &svo); - if (pm && po && pm < po) - ((hint == 2) ? croak : warn)(indirect_msg, SvPV_nolen_const(svm), - SvPV_nolen_const(svo)); + if (pm && po && pm < po) { + const char *psvm = SvPV_nolen_const(svm), *psvo = SvPV_nolen_const(svo); + if (hint == 2) + croak(indirect_msg, psvm, psvo); + else + warn(indirect_msg, psvm, psvo); + } } done: