All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pv-grub: correct sizeof usage
@ 2014-03-29  5:08 Matthew Daley
  2014-03-30  7:29 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Daley @ 2014-03-29  5:08 UTC (permalink / raw)
  To: xen-devel; +Cc: Samuel Thibault, Matthew Daley, xen-devel, Stefano Stabellini

We were lucky that sizeof(frame) >= sizeof(*frame) anyway.

Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
---
 stubdom/grub/mini-os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 64ab962..9d4bcc7 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -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);
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-30  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29  5:08 [PATCH] pv-grub: correct sizeof usage Matthew Daley
2014-03-30  7:29 ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.