[Top][All Lists]
[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
- [Qemu-devel] [PATCH 00/19 v2] Port -net to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 01/24] Use qemu_strdup() for NICInfo string fields, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 04/24] Correctly free nd structure, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 20/24] Clean up legacy code in net_client_init(), Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 11/24] Add qemu_opts_validate() for post parsing validation, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 02/24] Don't assign a static string to NICInfo::model, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 03/24] Make NICInfo string fields non-const,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 10/24] Make qemu_opts_parse() handle empty strings, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 09/24] Remove double error message for -device option parsing, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 13/24] Add qemu_net_opts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 23/24] Port PCI NIC hotplug to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 06/24] Fix coding style issue, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 08/24] Remove double error message in qemu_option_set(), Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 22/24] Port usb net to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 05/24] Use qemu_strdup() for VLANClientState string fields, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 17/24] Port -net socket to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 15/24] Port -net user to QemuOpts, Mark McLoughlin, 2009/09/23