thunk: improve readability of allocation loop
PATCH 1/1 thunk: improve readability of allocation loop
Signed-off-by Aarushi Mehta <[email protected]>
--- thunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
thunk.c +1 -1
@@ -86,7 +86,7 @@ void thunk_register_struct(int id, const char *name, const argtype *types)#endif /* now we can alloc the data */ -for (i =0 ;i <2 ; i++) { +for (i =0 ; i <ARRAY_SIZE (se->field_offsets); i++) { offset =0 ; max_align =1 ; se->field_offsets[i] =g_new (int, nb_fields);
Signature · 1 line
2.17.1
Quoted 5 lines · Aarushi Mehta
Signed-off-by Aarushi Mehta <[email protected]>--- thunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Stefan Hajnoczi <[email protected]>
Laurent Vivier
AppliedQuoted 11 lines · Aarushi Mehta
Signed-off-by Aarushi Mehta <[email protected]>--- thunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)thunk.c +0
-0
thunk.c void thunk_register_struct(int id, const char *name, const argtype *types) · line 92
Quoted 8 lines
thunk.c +1
-1@@ -86,7 +86,7 @@ void thunk_register_struct(int id, const char *name, const argtype *types)#endif /* now we can alloc the data */ -for (i =0 ;i <2 ; i++) { +for (i =0 ; i <ARRAY_SIZE (se->field_offsets); i++) { offset =0 ; max_align =1 ; se->field_offsets[i] =g_new (int, nb_fields);
Applied to my trivial-patches branch.
Thanks,
Laurent