Bug 444034 - jprof fails to sort symbols correctly. r=dbaron

This commit is contained in:
Joshua Cranmer 2008-09-23 21:15:52 -04:00
parent 21c9167e4e
commit a14312ed28

View File

@ -291,8 +291,8 @@ static int symbolOrder(void const* a, void const* b)
{ {
Symbol const* ap = (Symbol const *)a; Symbol const* ap = (Symbol const *)a;
Symbol const* bp = (Symbol const *)b; Symbol const* bp = (Symbol const *)b;
ptrdiff_t diff = ap->address - bp->address; return ap->address == bp->address ? 0 :
return (diff == 0) ? 0 : ((diff > 0) ? 1 : -1); (ap->address > bp->address ? 1 : -1);
} }
void leaky::ReadSharedLibrarySymbols() void leaky::ReadSharedLibrarySymbols()