Remove superfluous checks
This commit is contained in:
@@ -260,7 +260,7 @@ LastModifiedIndex::InternalGetIterator()
|
|||||||
AbstractIndexIterator*
|
AbstractIndexIterator*
|
||||||
LastModifiedIndex::InternalFind(const void* key, size_t length)
|
LastModifiedIndex::InternalFind(const void* key, size_t length)
|
||||||
{
|
{
|
||||||
if (!key || length != sizeof(time_t))
|
if (length != sizeof(time_t))
|
||||||
return NULL;
|
return NULL;
|
||||||
Iterator* iterator = new(std::nothrow) Iterator;
|
Iterator* iterator = new(std::nothrow) Iterator;
|
||||||
if (iterator != NULL) {
|
if (iterator != NULL) {
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ NameIndex::InternalGetIterator()
|
|||||||
AbstractIndexIterator*
|
AbstractIndexIterator*
|
||||||
NameIndex::InternalFind(const void* _key, size_t length)
|
NameIndex::InternalFind(const void* _key, size_t length)
|
||||||
{
|
{
|
||||||
if (_key == NULL || length == 0)
|
if (length == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
const char* key = (const char*)_key;
|
const char* key = (const char*)_key;
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ SizeIndex::InternalGetIterator()
|
|||||||
AbstractIndexIterator*
|
AbstractIndexIterator*
|
||||||
SizeIndex::InternalFind(const void* key, size_t length)
|
SizeIndex::InternalFind(const void* key, size_t length)
|
||||||
{
|
{
|
||||||
if (!key || length != sizeof(off_t))
|
if (length != sizeof(off_t))
|
||||||
return NULL;
|
return NULL;
|
||||||
Iterator* iterator = new(std::nothrow) Iterator;
|
Iterator* iterator = new(std::nothrow) Iterator;
|
||||||
if (iterator != NULL) {
|
if (iterator != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user