qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ian Molton <ian.molton@collabora.co.uk>
To: Stefan Weil <weil@mail.berlios.de>
Cc: kwolf@redhat.com, sgrubb@redhat.com,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] e1000: Fix warning from code review
Date: Thu, 19 Nov 2009 20:16:39 +0000	[thread overview]
Message-ID: <4B05A7A7.2000302@collabora.co.uk> (raw)
In-Reply-To: <1258656295-5688-1-git-send-email-weil@mail.berlios.de>

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.

-Ian

  reply	other threads:[~2009-11-19 20:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 11:39 [Qemu-devel] Fwd: qemu code review Kevin Wolf
2009-11-18 16:34 ` malc
2009-11-18 18:43 ` Blue Swirl
2009-11-18 19:06 ` Stefan Weil
2009-11-19  9:09   ` Kevin Wolf
2009-11-19 18:11     ` Steve Grubb
2009-11-19 18:44       ` [Qemu-devel] [PATCH] e1000: Fix warning from " Stefan Weil
2009-11-19 20:16         ` Ian Molton [this message]
2009-11-23 10:44       ` [Qemu-devel] Fwd: qemu " Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B05A7A7.2000302@collabora.co.uk \
    --to=ian.molton@collabora.co.uk \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgrubb@redhat.com \
    --cc=weil@mail.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).