1. 优化环状数组
This commit is contained in:
parent
fc00bd72e8
commit
7201a8629a
@ -120,7 +120,7 @@ HRingBufferLenType HRingbufferInit8(void *buffer, HRingBufferLenType size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t init[] = _HRING_BUFFER_INIT8(len);
|
const uint8_t init[] = _HRING_BUFFER_INIT8(len);
|
||||||
memcpy(buffer, init, sizeof(init));
|
memcpy(buffer, init, sizeof(init));
|
||||||
return HRingBufferGetLen((HRingBufferType *)buffer);
|
return HRingBufferGetLen((HRingBufferType *)buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user