Message ID | 20170718061005.29518-30-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
On Mon, Jul 17, 2017 at 11:10 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > tests/test-string-output-visitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c > index e736db3af8..f0902dd49e 100644 > --- a/tests/test-string-output-visitor.c > +++ b/tests/test-string-output-visitor.c > @@ -97,7 +97,7 @@ static void test_visitor_out_intList(TestOutputVisitorData *data, > Error *err = NULL; > char *str; > > - for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) { > + for (i = 0; i < ARRAY_SIZE(value); i++) { > *tmp = g_malloc0(sizeof(**tmp)); > (*tmp)->value = value[i]; > tmp = &(*tmp)->next; > -- > 2.13.2 > >
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c index e736db3af8..f0902dd49e 100644 --- a/tests/test-string-output-visitor.c +++ b/tests/test-string-output-visitor.c @@ -97,7 +97,7 @@ static void test_visitor_out_intList(TestOutputVisitorData *data, Error *err = NULL; char *str; - for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) { + for (i = 0; i < ARRAY_SIZE(value); i++) { *tmp = g_malloc0(sizeof(**tmp)); (*tmp)->value = value[i]; tmp = &(*tmp)->next;
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- tests/test-string-output-visitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)