Angus Salkeld
5d8c96314e
Allow the array to automatically grow.
...
this makes it a bit friendlier to use, as
the user will not have to call qb_array_grow().
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-04 21:40:03 +11:00
Yunkai Zhang
c8e97a1c2e
Fixed bug: incorrect array length definition
...
When MAX_BINS is larger than MAX_BIN_ELEMENTS, this bug will cause
boudary overflow in qb_array_create function.
Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-29 10:12:07 +11:00
Angus Salkeld
b2a0c06d50
ARRAY: make sure that num_bins stays below MAX_BINS
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-10 09:28:55 +11:00
Angus Salkeld
98493d9ae8
Change Lindent options to break the procedure type.
...
so change:
int foo(void)
to
int
foo(void)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 14:19:14 +10:00
Angus Salkeld
24107d56ef
COV 8: don't leak mem when returning an error.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
4de5ff927f
ARRAY: add getter's to retrieve number of bins and elms/bin
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 09:55:57 +10:00
Angus Salkeld
0d345d3ef1
ARRAY: return -ERANGE when index is out of range.
...
So you can differentiate the other errors (-EINVAL)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-13 11:23:00 +10:00
Angus Salkeld
7b2a0d3767
TEST: add some more array tests.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 21:16:47 +11:00
Angus Salkeld
9745d4feb7
Add a resizable array that doesn't move memory.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-10-19 07:05:54 +11:00