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:
Matthew Daley authored and Ian Campbell committed 2014-04-01 11:32:05 +01:00
1 parent 5182275cfd
commit 0ac7e6a2c5
1 file changed
+1 -1
+1 -1
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.