fix a typo causing sensor event to be sorted in reverse chronological order

Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832
This commit is contained in:
Mathias Agopian 2012-04-19 18:18:24 -07:00
parent 907103bf18
commit a5c106a4f0
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ void SensorService::sortEventBuffer(sensors_event_t* buffer, size_t count)
static int cmp(void const* lhs, void const* rhs) {
sensors_event_t const* l = static_cast<sensors_event_t const*>(lhs);
sensors_event_t const* r = static_cast<sensors_event_t const*>(rhs);
return r->timestamp - l->timestamp;
return l->timestamp - r->timestamp;
}
};
qsort(buffer, count, sizeof(sensors_event_t), compar::cmp);