qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 03/24] Make NICInfo string fields non-const


From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH 03/24] Make NICInfo string fields non-const
Date: Wed, 23 Sep 2009 11:24:02 +0100

We now only assign strdup()ed strings to these fields, never static
strings.

Signed-off-by: Mark McLoughlin <address@hidden>
---
 net.c |    2 +-
 net.h |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net.c b/net.c
index c276d0a..d04b6bd 100644
--- a/net.c
+++ b/net.c
@@ -2804,7 +2804,7 @@ void net_client_uninit(NICInfo *nd)
     nd->vlan->nb_guest_devs--;
     nb_nics--;
     nd->used = 0;
-    qemu_free((void *)nd->model);
+    qemu_free(nd->model);
 }
 
 static int net_host_check_device(const char *device)
diff --git a/net.h b/net.h
index 1479826..d48c9b8 100644
--- a/net.h
+++ b/net.h
@@ -94,10 +94,10 @@ enum {
 
 struct NICInfo {
     uint8_t macaddr[6];
-    const char *model;
-    const char *name;
-    const char *devaddr;
-    const char *id;
+    char *model;
+    char *name;
+    char *devaddr;
+    char *id;
     VLANState *vlan;
     VLANClientState *vc;
     void *private;
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]