Remove superfluous checks

This commit is contained in:
Ingo Weinhold 2011-07-08 23:33:29 +02:00
parent 4006e48369
commit ac6706807e
3 changed files with 3 additions and 3 deletions
src/add-ons/kernel/file_systems/packagefs

@ -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) {