Skip to content

Commit

Permalink
allow align_length == old_length
Browse files Browse the repository at this point in the history
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
cofyc committed Aug 14, 2012
1 parent 8fecfe2 commit 4e14d1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ringbuffer.c
Expand Up @@ -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;
Expand Down

0 comments on commit 4e14d1f

Please sign in to comment.