On 22 February 2016 at 21:29, Samuel Thibault <samuel.thiba...@ens-lyon.org> wrote: > struct mbuf uses a C99 open char array to allow inlining data.
At the moment it doesn't, it uses a 1 byte array :-) Turning that into a C99 flexible array is what we'd like to do... > Inlining > this in another structure is however a GNU extension. The inlines used > so far in struct Slirp were actually only needed as head of struct > mbuf lists. This replaces these inline with mere struct quehead, > and use casts as appropriate. > > Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > --- > slirp/if.c | 27 ++++++++++++++------------- > slirp/mbuf.c | 19 ++++++++++--------- > slirp/misc.c | 5 ----- > slirp/misc.h | 5 +++++ > slirp/slirp.h | 8 +++++--- > 5 files changed, 34 insertions(+), 30 deletions(-) It's a slight shame that we end up having to have the extra casts, but I guess it can't be helped. Converting the code to use one of the qemu/queue.h data structures doesn't seem worth the effort and risk of introducing bugs. (Does this pass checkpatch.pl? I wasn't sure about the spacing round some of the casts...) Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM