Remove superfluous checks

This commit is contained in:
Ingo Weinhold
2011-11-25 06:19:29 +01:00
parent 08bed1acb7
commit 1197afa806
3 changed files with 3 additions and 3 deletions
@@ -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) {