Chore: introduce macro ARRAY_SIZE

This commit is contained in:
李通洲
2024-10-18 16:15:48 +08:00
parent 5497cb64c2
commit b257134d74
67 changed files with 142 additions and 135 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ void ffPrintDateTime(FFDateTimeOptions* options)
}
char buffer[32];
if (strftime(buffer, sizeof(buffer), "%F %T", tm) == 0) //yyyy-MM-dd HH:mm:ss
if (strftime(buffer, ARRAY_SIZE(buffer), "%F %T", tm) == 0) //yyyy-MM-dd HH:mm:ss
{
ffPrintError(FF_DATETIME_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "strftime() failed");
return;