Further refinement of function
This commit is contained in:
parent
6475d0ca54
commit
4bcc479041
|
@ -650,12 +650,11 @@ static void strftime_am_pm(char *s, size_t len, const char* format,
|
||||||
strftime(s, len, format, timeptr);
|
strftime(s, len, format, timeptr);
|
||||||
#if !(defined(__linux__) && !defined(ANDROID))
|
#if !(defined(__linux__) && !defined(ANDROID))
|
||||||
local = local_to_utf8_string_alloc(s);
|
local = local_to_utf8_string_alloc(s);
|
||||||
|
|
||||||
if (!string_is_empty(local))
|
|
||||||
strlcpy(s, local, len);
|
|
||||||
|
|
||||||
if (local)
|
if (local)
|
||||||
{
|
{
|
||||||
|
if (!string_is_empty(local))
|
||||||
|
strlcpy(s, local, len);
|
||||||
|
|
||||||
free(local);
|
free(local);
|
||||||
local = NULL;
|
local = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -637,12 +637,11 @@ static void last_played_strftime(char *s, size_t len, const char *format,
|
||||||
strftime(s, len, format, timeptr);
|
strftime(s, len, format, timeptr);
|
||||||
#if !(defined(__linux__) && !defined(ANDROID))
|
#if !(defined(__linux__) && !defined(ANDROID))
|
||||||
local = local_to_utf8_string_alloc(s);
|
local = local_to_utf8_string_alloc(s);
|
||||||
|
|
||||||
if (!string_is_empty(local))
|
|
||||||
strlcpy(s, local, len);
|
|
||||||
|
|
||||||
if (local)
|
if (local)
|
||||||
{
|
{
|
||||||
|
if (!string_is_empty(local))
|
||||||
|
strlcpy(s, local, len);
|
||||||
|
|
||||||
free(local);
|
free(local);
|
||||||
local = NULL;
|
local = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue