darray: use unsigned int instead of size_t for array size
authorRan Benita <ran234@gmail.com>
Fri, 7 Feb 2014 23:13:50 +0000 (01:13 +0200)
committerRan Benita <ran234@gmail.com>
Fri, 7 Feb 2014 23:50:22 +0000 (01:50 +0200)
commitb9b3593cbdeb7f5b02d50cecaba6a0b47d4979ad
tree6256b77b96673dd1939373645a17098e727ac885
parent94e0be0dc7a642c7b650284347e6723facf7c56e
darray: use unsigned int instead of size_t for array size

size_t is too large; if we ever need it, that's the least of our
problems. Besides, when we roll our own (e.g. in keymap.h) it's already
unsigned int. Instead, add some emergency overflow check. So, why?

- It plays nicer with all the other uint32_t's and unsigned int's (no
  extensions, etc.).
- Reduces keymap memory usage by 5% or so as a bonus.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/darray.h