[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] e1000: Fix warning from code review

From: Ian Molton
Subject: Re: [Qemu-devel] [PATCH] e1000: Fix warning from code review
Date: Thu, 19 Nov 2009 20:16:39 +0000
User-agent: Mozilla-Thunderbird (X11/20090707)

Stefan Weil wrote:
> A code review run by Steve Grubb complained about code in e1000.c:
> In hw/e1000.c at line 89, vlan is declared to be 4 bytes.
> At line 382 is an attempt to do a memmove over it with a size of 12.

> +        /* Fields vlan and data must not be reordered or separated. */
>          unsigned char vlan[4];
>          unsigned char data[0x10000];

Wouldnt it be better to stuff both into a struct or something? I guess
from the '12' that the data size can vary, but thats less important if
they are packed in a way that the compiler (and coders!) know not to
seperate them.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]