diff options
author | Karl Williamson <khw@cpan.org> | 2023-01-01 03:59:38 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2023-01-05 19:59:30 -0700 |
commit | 8771ee452dafdaf695956865631e6de4c9062634 (patch) | |
tree | 864fb1a724f2f76b72c71d7a8052513b2aab949f /locale.c | |
parent | 2935c197ac4c1c48a02fd3c107ffdcdcda54b99a (diff) | |
download | perl-8771ee452dafdaf695956865631e6de4c9062634.tar.gz |
locale.c: Don't SAVEFREEPV a void
This appears to have been working, but Newx is documented as returning a
void, so that SAVEFREEPV() would have been doing nothing.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1712,7 +1712,8 @@ S_calculate_LC_ALL(pTHX_ const char ** individ_locales) names_len++; /* Trailing '\0' */ /* Allocate enough space for the aggregated string */ - SAVEFREEPV(Newxz(aggregate_locale, names_len, char)); + Newxz(aggregate_locale, names_len, char); + SAVEFREEPV(aggregate_locale); /* Then fill it in */ for (i = 0; i < NOMINAL_LC_ALL_INDEX; i++) { @@ -6475,10 +6476,8 @@ S_get_displayable_string(pTHX_ * If UTF-8, all are the largest possible code point; otherwise all are a * single byte. '(2 + 1)' is from each byte takes 2 characters to * display, and a blank (or NUL for the final one) after it */ - SAVEFREEPV(Newxz(ret, - (e - s) * (2 + 1) - * ((is_utf8) ? UVSIZE : 1), - char)); + Newxz(ret, (e - s) * (2 + 1) * ((is_utf8) ? UVSIZE : 1), char); + SAVEFREEPV(ret); while (t < e) { UV cp = (is_utf8) |