Skip to content
Browse files

allow align_length == old_length

it's common that align_length is equal to old_length at mread.c:465
when we write around rd bytes data
  • Loading branch information...
1 parent 8fecfe2 commit 4e14d1f2a4be9cb6c0abbfd4b0ac3e5be4d58f3f @Cofyc Cofyc committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 ringbuffer.c
View
2 ringbuffer.c
@@ -136,7 +136,7 @@ ringbuffer_resize(struct ringbuffer * rb, struct ringbuffer_block * blk, int siz
}
int align_length = ALIGN(sizeof(struct ringbuffer_block) + size);
int old_length = ALIGN(blk->length);
- assert(align_length < old_length);
+ assert(align_length <= old_length);
blk->length = size + sizeof(struct ringbuffer_block);
if (align_length == old_length) {
return;

0 comments on commit 4e14d1f

Please sign in to comment.
Something went wrong with that request. Please try again.