This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix -DPERL_POISON builds
authorDavid Mitchell <davem@iabyn.com>
Tue, 23 Apr 2019 09:21:27 +0000 (10:21 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 23 Apr 2019 09:21:27 +0000 (10:21 +0100)
Remove unnecessary casts that confused the Safefree() macro
under PERL_POISON.

The casts were needed when I directly called safefree(), but became
superfluous once I switched to using the Safefree() macro.

op.c

diff --git a/op.c b/op.c
index dac9910..1862f1b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -16671,8 +16671,8 @@ custom_op_register_free(pTHX_ SV *sv, MAGIC *mg)
 
     PERL_UNUSED_ARG(mg);
     xop = INT2PTR(XOP *, SvIV(sv));
-    Safefree((void*)xop->xop_name);
-    Safefree((void*)xop->xop_desc);
+    Safefree(xop->xop_name);
+    Safefree(xop->xop_desc);
     Safefree(xop);
     return 0;
 }