Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed May 5, 2020
1 parent 9a3ac79 commit 8912ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/support/ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class RingBuffer {
ring_.size() > kInitCapacity) {
// shrink too large temporary buffer to
// avoid out of memory on some embedded devices
if (bytes_avaliable_ != 0) {
if (bytes_available_ != 0) {
// move existing bytes to the head.
size_t old_bytes = bytes_available_;
std::vector<char> tmp(old_bytes);
Expand All @@ -83,7 +83,7 @@ class RingBuffer {
// shrink the ring.
size_t new_size = kInitCapacity;
new_size = std::max(new_size, n);
new_size = std::max(new_size, byte_available_);
new_size = std::max(new_size, bytes_available_);

ring_.resize(new_size);
ring_.shrink_to_fit();
Expand Down

0 comments on commit 8912ed4

Please sign in to comment.