mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
pv-grub: correct sizeof usage
We were lucky that sizeof(frame) >= sizeof(*frame) anyway. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
5182275cfd
commit
0ac7e6a2c5
1 file changed
+1
-1
@@ -333,7 +333,7 @@ struct frame {
|
||||
static void minios_transmit (struct nic *nic, const char *d, unsigned int t,
|
||||
unsigned int s, const char *p)
|
||||
{
|
||||
struct frame *frame = alloca(sizeof(frame) + s);
|
||||
struct frame *frame = alloca(sizeof(*frame) + s);
|
||||
|
||||
memcpy(frame->dest, d, ETH_ALEN);
|
||||
memcpy(frame->src, nic->node_addr, ETH_ALEN);
|
||||
|
||||