qsort and bsearch need different kinds of callback functions

Change-Id: I4a661434c3a51169ec14336bb39a1d2ceeb139ad