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