This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #17487] ncftp only handles http
[perl5.git] / locale.c
index 77a83fd..145bed7 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -112,10 +112,8 @@ Perl_new_numeric(pTHX_ const char *newnum)
 #ifdef USE_LOCALE_NUMERIC
 
     if (! newnum) {
-       if (PL_numeric_name) {
-           Safefree(PL_numeric_name);
-           PL_numeric_name = NULL;
-       }
+       Safefree(PL_numeric_name);
+       PL_numeric_name = NULL;
        PL_numeric_standard = TRUE;
        PL_numeric_local = TRUE;
        return;
@@ -534,16 +532,13 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
 #endif
 
 #ifdef USE_LOCALE_CTYPE
-    if (curctype != NULL)
-       Safefree(curctype);
+    Safefree(curctype);
 #endif /* USE_LOCALE_CTYPE */
 #ifdef USE_LOCALE_COLLATE
-    if (curcoll != NULL)
-       Safefree(curcoll);
+    Safefree(curcoll);
 #endif /* USE_LOCALE_COLLATE */
 #ifdef USE_LOCALE_NUMERIC
-    if (curnum != NULL)
-       Safefree(curnum);
+    Safefree(curnum);
 #endif /* USE_LOCALE_NUMERIC */
     return ok;
 }
@@ -575,7 +570,7 @@ Perl_mem_collxfrm(pTHX_ const char *s, STRLEN len, STRLEN *xlen)
     /* the +1 is for the terminating NUL. */
 
     xAlloc = sizeof(PL_collation_ix) + PL_collxfrm_base + (PL_collxfrm_mult * len) + 1;
-    New(171, xbuf, xAlloc, char);
+    Newx(xbuf, xAlloc, char);
     if (! xbuf)
        goto bad;