测试用例
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user