fix parameter order in calloc() calls

calloc(nmemb, bytes) allocates memory for an array of _nmemb_ elements of size _bytes_
This commit is contained in:
Frank
2026-01-01 22:02:06 +01:00
parent e1651f1ab9
commit f9c7828eeb
2 changed files with 6 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ void Segment::allocLeds() {
portEXIT_CRITICAL(&ledsrgb_mux);
if (oldLedsRgb) free(oldLedsRgb); // we need a bigger buffer, so free the old one first
CRGB* newLedsRgb = (CRGB*)calloc(1, size); // WLEDMM This is an OS call, so we should not wrap it in portEnterCRITICAL
CRGB* newLedsRgb = (CRGB*)calloc(size, 1); // WLEDMM This is an OS call, so we should not wrap it in portEnterCRITICAL
portENTER_CRITICAL(&ledsrgb_mux);
ledsrgb = newLedsRgb;