DynamicBuffer: remove unneeded size check. CID 604168.

This commit is contained in:
Jessica Hamilton
2014-05-08 16:41:14 +12:00
parent 7e9976c58b
commit 194ce33d65
@@ -23,14 +23,12 @@ DynamicBuffer::DynamicBuffer(size_t initialSize) :
fDataEnd(0), fDataEnd(0),
fInit(B_NO_INIT) fInit(B_NO_INIT)
{ {
if (initialSize >= 0) {
fBuffer = new (std::nothrow) unsigned char[initialSize]; fBuffer = new (std::nothrow) unsigned char[initialSize];
if (fBuffer != NULL) { if (fBuffer != NULL) {
fBufferSize = initialSize; fBufferSize = initialSize;
fInit = B_OK; fInit = B_OK;
} }
} }
}
DynamicBuffer::~DynamicBuffer() DynamicBuffer::~DynamicBuffer()