测试用例

This commit is contained in:
2026-08-29 11:39:28 +08:00
parent a0758766c5
commit 8fd65b0de0
19 changed files with 1723 additions and 432 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ c_err_t c_FastByteRingBuffer_Init(c_FastByteRingBuffer_t* self, c_size_t capacit
self->tail = 0;
self->is_full = C_FALSE;
self->buffer = (uint8_t*)malloc(self->capacity);
self->buffer = (uint8_t*)C_ALLOC(self->capacity);
if (!self->buffer) {
self->capacity = 0;
self->mask = 0;
@@ -339,7 +339,7 @@ c_index_t c_FastByteRingBuffer_IndexOfByte(const c_FastByteRingBuffer_t* self, u
return (c_index_t)offset;
}
}
return C_ERR_FAIL;
return C_ERR_NOTFOUND;
}
c_index_t c_FastByteRingBuffer_IndexOfBuffer(const c_FastByteRingBuffer_t* self, const uint8_t* pattern, c_size_t pattern_len) {