To be consistent with the rest of the code, the index paramater should
not be evaluated multiple times. Calling this with rand() % arr.size
would otherwise generally segfault.
---
ccan/darray/darray.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ccan/darray/darray.h
The memmove() call should be using the index argument to determine the
number of bytes to copy.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ccan/darray/darray.h b/ccan/darray/darray.h
Identifiers starting with underscores are technically reserved for
system use, so rename all of them to end with one instead.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 68 ++--
1 file changed, 34 inse
Good point about shadowing index(3), I'll send a patch renaming all the
uses of 'index'.
On Sun, Aug 27, 2017 at 4:56 AM, David Gibson <da...@gibson.dropbear.id.au>
wrote:
> On Sat, Aug 26, 2017 at 06:26:20PM +0200, Damien Grassart wrote:
> > The memmove() call should be using the
This module currently supports removing but not inserting at a
specified index, so this adds that along with some tests. Inserting a
value moves all existing data beyond index over one element.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 7 +++
Gibson <da...@gibson.dropbear.id.au>
wrote:
> On Sun, Aug 27, 2017 at 11:26:24PM +0200, Damien Grassart wrote:
> > The memmove() call should be using the index argument to determine the
> > number of bytes to copy. To be consistent with the rest of the code,
> > we should
to avoid using "index" as an identifier so as to not
shadow index(3) in the C library.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ccan/darray/darray.h b/ccan/darra
This module currently supports removing but not inserting at a
specified index, so this adds that along with some tests. Inserting a
value moves all existing data beyond index over one element.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 7 +++
to avoid using "index" as an identifier so as to not
shadow index(3) in the C library.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ccan/darray/darray.h b/ccan/darra
Identifiers starting with underscores are technically reserved for
system use, so rename all of them to end with one instead.
Signed-off-by: Damien Grassart <dam...@grassart.com>
---
ccan/darray/darray.h | 68 ++--
1 file changed, 34 inse
10 matches
Mail list logo