diff options
Diffstat (limited to 'extra/yassl/src/buffer.cpp')
-rw-r--r-- | extra/yassl/src/buffer.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index e1583fc96bb..d885c953207 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -12,8 +12,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. */ @@ -34,14 +35,6 @@ namespace yaSSL { -// Checking Policy should implement a check function that tests whether the -// index is within the size limit of the array - -void Check::check(uint i, uint limit) -{ - assert(i < limit); -} - void NoCheck::check(uint, uint) { @@ -85,7 +78,6 @@ input_buffer::~input_buffer() // users can pass defualt zero length buffer and then allocate void input_buffer::allocate(uint s) { - assert(!buffer_); // find realloc error buffer_ = NEW_YS byte[s]; end_ = buffer_ + s; } @@ -143,7 +135,6 @@ void input_buffer::set_current(uint i) // user passes in AUTO index for ease of use const byte& input_buffer::operator[](uint i) { - assert (i == AUTO); check(current_, size_); return buffer_[current_++]; } @@ -240,7 +231,6 @@ void output_buffer::set_current(uint c) // users can pass defualt zero length buffer and then allocate void output_buffer::allocate(uint s) { - assert(!buffer_); // find realloc error buffer_ = NEW_YS byte[s]; end_ = buffer_ + s; } @@ -256,7 +246,6 @@ const byte* output_buffer::get_buffer() const // user passes in AUTO as index for ease of use byte& output_buffer::operator[](uint i) { - assert(i == AUTO); check(current_, get_capacity()); return buffer_[current_++]; } |