test-marshallers.proto: ArrayMessage: make space for name

Do it by adding @end tag.
Without it the allocated memory has no space for 'name'.

Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h,
replacing int8_t* name with int8_t name[0].
This makes name an "in-structure" array with no pre-defined size
instead of a pointer.
The size is defined by the message size.

Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Uri Lublin 2019-08-13 19:45:12 +03:00 committed by Frediano Ziglio
parent a52a0a0906
commit 01417b7533
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ typedef struct {
} SpiceMsgMainShortDataSubMarshall;
typedef struct {
int8_t *name;
int8_t name[0];
} SpiceMsgMainArrayMessage;
typedef struct {

View File

@ -6,7 +6,7 @@ channel TestChannel {
} ShortDataSubMarshall;
message {
int8 name[];
int8 name[] @end;
} ArrayMessage;
message {