[haiku-commits] Re: haiku: hrev51525 - src/apps/text_search
- From: Philippe Houdoin <philippe.houdoin@xxxxxxxxx>
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Tue, 7 Nov 2017 16:33:43 +0100
* if (item != NULL)
* item is used in fSearchResults->IndexOf(item) whereas it is later
checked for NULL.
??
The new code checking for NULL :
ResultItem* item = fSearchResults->FindItem(ref, &index);
if (item) {
item->SetText(path.String());
// take care of invalidation, the index is currently
// the full list index, but needs to be the visible
// items index for this
index = fSearchResults->IndexOf(item);
fSearchResults->InvalidateItem(index);
}
I fail to see where it's later checked for NULL..
These should be alphabetically sorted.
Done in a subsequent commit.
Oh, I miss errno.h, right. Will fix.
The return values for pipe(), dup2() should be checked.
Also one statement per line.
Will do that too.
Thanks for proofreading.
Other related posts: