mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
core: fix tests on function strftimeval on Alpine
This commit is contained in:
+16
-8
@@ -199,15 +199,23 @@ util_strftimeval (char *string, int max, const char *format, struct timeval *tv)
|
||||
string_dyn_concat (format2, "%%", -1);
|
||||
ptr_format += 2;
|
||||
}
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == '.')
|
||||
&& (ptr_format[2] >= '1') && (ptr_format[2] <= '6'))
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == '.'))
|
||||
{
|
||||
snprintf (str_temp, sizeof (str_temp),
|
||||
"%06ld", (long)(tv->tv_usec));
|
||||
length = ptr_format[2] - '1' + 1;
|
||||
str_temp[length] = '\0';
|
||||
string_dyn_concat (format2, str_temp, -1);
|
||||
ptr_format += 3;
|
||||
if ((ptr_format[2] >= '1') && (ptr_format[2] <= '6'))
|
||||
{
|
||||
snprintf (str_temp, sizeof (str_temp),
|
||||
"%06ld", (long)(tv->tv_usec));
|
||||
length = ptr_format[2] - '1' + 1;
|
||||
str_temp[length] = '\0';
|
||||
string_dyn_concat (format2, str_temp, -1);
|
||||
ptr_format += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_format += 2;
|
||||
if (ptr_format[0])
|
||||
ptr_format++;
|
||||
}
|
||||
}
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == 'f'))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user