]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Remove the possibly miscompiled syntax ((hints == 2) ? croak : warn)(msg)
authorVincent Pit <vince@profvince.com>
Mon, 11 Aug 2008 15:38:50 +0000 (17:38 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 11 Aug 2008 15:38:50 +0000 (17:38 +0200)
indirect.xs

index 1e546d6041e83bc95d1ddcfa547f2afc72751cb2..6909bf44a1055576a801bb577befa800afed28a8 100644 (file)
@@ -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: