ncorrect memset with strlen

This commit is contained in:
2026-01-10 11:02:31 +01:00
parent 09a3c3a22d
commit 781f9a1445

View File

@ -307,7 +307,7 @@ void taskMetrics(void *pvParameters)
aMetrics[u16MetricCounter].i64MetricValue = ap.rssi; aMetrics[u16MetricCounter].i64MetricValue = ap.rssi;
u16MetricCounter++; u16MetricCounter++;
configASSERT(u16MetricCounter > METRIC_MAX_COUNT); configASSERT(!(u16MetricCounter > METRIC_MAX_COUNT));
vSetMetrics(aMetrics, u16MetricCounter); vSetMetrics(aMetrics, u16MetricCounter);
} }
} }
@ -317,7 +317,7 @@ void vSetMetrics(sMetric *paMetrics, uint16_t u16Size)
if (xSemaphoreTakeRecursive(xMutexAccessMetricResponse, pdMS_TO_TICKS(5000)) == pdTRUE) if (xSemaphoreTakeRecursive(xMutexAccessMetricResponse, pdMS_TO_TICKS(5000)) == pdTRUE)
{ {
memset(caHtmlResponse, 0U, strlen(caHtmlResponse)); memset(caHtmlResponse, 0U, HTML_RESPONSE_SIZE);
for (uint16_t u16Index = 0U; u16Index < u16Size; u16Index++) for (uint16_t u16Index = 0U; u16Index < u16Size; u16Index++)
{ {
char caValueBuffer[64]; char caValueBuffer[64];