Remove superfluous checks
This commit is contained in:
parent
4006e48369
commit
ac6706807e
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user