diff mbox

Virtio-net: Replace the hardcode 6 with defined ETN_ALEN

Message ID 1274582950-4418-1-git-send-email-akong@redhat.com
State Accepted
Delegated to: Anthony Liguori
Headers show

Commit Message

Amos Kong May 23, 2010, 2:49 a.m. UTC
From: Amos Kong <akong@redhat.com>

hw/virtio-net.h:
    #define ETH_ALEN    6
ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa

Signed-off-by: Amos Kong <akong@redhat.com>
---
 hw/virtio-net.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Anthony Liguori May 24, 2010, 8:29 p.m. UTC | #1
On 05/22/2010 09:49 PM, akong@redhat.com wrote:
> From: Amos Kong<akong@redhat.com>
>
> hw/virtio-net.h:
>      #define ETH_ALEN    6
> ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa
>
> Signed-off-by: Amos Kong<akong@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   hw/virtio-net.h |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio-net.h b/hw/virtio-net.h
> index e55119b..235f1a9 100644
> --- a/hw/virtio-net.h
> +++ b/hw/virtio-net.h
> @@ -54,8 +54,8 @@
>
>   struct virtio_net_config
>   {
> -    /* The config defining mac address (6 bytes) */
> -    uint8_t mac[6];
> +    /* The config defining mac address ($ETH_ALEN bytes) */
> +    uint8_t mac[ETH_ALEN];
>       /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
>       uint16_t status;
>   } __attribute__((packed));
>
diff mbox

Patch

diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index e55119b..235f1a9 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -54,8 +54,8 @@ 
 
 struct virtio_net_config
 {
-    /* The config defining mac address (6 bytes) */
-    uint8_t mac[6];
+    /* The config defining mac address ($ETH_ALEN bytes) */
+    uint8_t mac[ETH_ALEN];
     /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
     uint16_t status;
 } __attribute__((packed));