1. 优化环状数组

This commit is contained in:
coffee 2025-10-28 10:58:15 +08:00
parent fc00bd72e8
commit 7201a8629a

View File

@ -120,7 +120,7 @@ HRingBufferLenType HRingbufferInit8(void *buffer, HRingBufferLenType size)
return 0;
}
uint8_t init[] = _HRING_BUFFER_INIT8(len);
const uint8_t init[] = _HRING_BUFFER_INIT8(len);
memcpy(buffer, init, sizeof(init));
return HRingBufferGetLen((HRingBufferType *)buffer);
}