diff --git a/locale.c b/locale.c index b53b17daabf2..69883526fa2f 100644 --- a/locale.c +++ b/locale.c @@ -702,6 +702,7 @@ S_my_querylocale_i(pTHX_ const unsigned int index) DEBUG_Lv(PerlIO_printf(Perl_debug_log, "my_querylocale_i(%s) returning '%s'\n", category_names[index], retval)); + assert(strNE(retval, "")); return retval; } @@ -2645,6 +2646,7 @@ Perl_setlocale(const int category, const char * locale) /* Here, an actual change is being requested. Do it */ retval = setlocale_i(cat_index, locale); + assert(retval == NULL || strNE(retval, "")); if (! retval) { DEBUG_L(PerlIO_printf(Perl_debug_log, @@ -2671,6 +2673,7 @@ Perl_setlocale(const int category, const char * locale) DEBUG_L(PerlIO_printf(Perl_debug_log, "returning '%s'\n", retval)); + assert(strNE(retval, "")); return retval; #endif @@ -3923,6 +3926,7 @@ S_my_langinfo_i(pTHX_ switch (item) { default: + assert(item < 0); /* Make sure using perl_langinfo.h */ return ""; case RADIXCHAR: