sv_true() has a superfluous test
Gurusamy Sarathy [Thu, 20 Jan 2000 08:40:13 +0000 (08:40 +0000)]
p4raw-id: //depot/perl@4823

sv.c
sv.h

diff --git a/sv.c b/sv.c
index 0b838a1..010ce2e 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4582,8 +4582,7 @@ Perl_sv_true(pTHX_ register SV *sv)
     if (SvPOK(sv)) {
        register XPV* tXpv;
        if ((tXpv = (XPV*)SvANY(sv)) &&
-               (*tXpv->xpv_pv > '0' ||
-               tXpv->xpv_cur > 1 ||
+               (tXpv->xpv_cur > 1 ||
                (tXpv->xpv_cur && *tXpv->xpv_pv != '0')))
            return 1;
        else
diff --git a/sv.h b/sv.h
index 4505d60..eea984a 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -676,8 +676,7 @@ struct xpvio {
     :    SvPOK(sv)                                             \
        ?   (({XPV *nxpv = (XPV*)SvANY(sv);                     \
             nxpv &&                                            \
-            (*nxpv->xpv_pv > '0' ||                            \
-             nxpv->xpv_cur > 1 ||                              \
+            (nxpv->xpv_cur > 1 ||                              \
              (nxpv->xpv_cur && *nxpv->xpv_pv != '0')); })      \
             ? 1                                                \
             : 0)                                               \
@@ -712,8 +711,7 @@ struct xpvio {
     ? 0                                                                \
     :    SvPOK(sv)                                             \
        ?   ((PL_Xpv = (XPV*)SvANY(sv)) &&                      \
-            (*PL_Xpv->xpv_pv > '0' ||                          \
-             PL_Xpv->xpv_cur > 1 ||                            \
+            (PL_Xpv->xpv_cur > 1 ||                            \
              (PL_Xpv->xpv_cur && *PL_Xpv->xpv_pv != '0'))      \
             ? 1                                                \
             : 0)                                               \