Closed luxl closed 5 years ago
shouldn't it be return &data_buff[tmp_tail & buffer_mask]; instead of return &data_buff[tmp_tail];, because head and tail keep growing, which may exceed the array boundary.
return &data_buff[tmp_tail & buffer_mask];
return &data_buff[tmp_tail];
shouldn't it be
return &data_buff[tmp_tail & buffer_mask];
instead ofreturn &data_buff[tmp_tail];
, because head and tail keep growing, which may exceed the array boundary.