aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-10-06 12:16:53 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-06 14:36:10 -0500
commit9203f5202bf4bc7e4669ba19d3e6aac7761bd385 (patch)
treeaca938144077f730db381296f559d4badb5a221f /hw
parent3cd67992f5ed8f2afcf849ab9bf17ba730a89b92 (diff)
Make NICInfo string fields non-const
We now only assign strdup()ed strings to these fields, never static strings. aliguori: fix build for ppc_prep and mips_jazz Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/mips_jazz.c2
-rw-r--r--hw/ppc_prep.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index 9578f28a48..3ff367d5c9 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -209,7 +209,7 @@ void mips_jazz_init (ram_addr_t ram_size,
for (n = 0; n < nb_nics; n++) {
nd = &nd_table[n];
if (!nd->model)
- nd->model = "dp83932";
+ nd->model = qemu_strdup("dp83932");
if (strcmp(nd->model, "dp83932") == 0) {
dp83932_init(nd, 0x80001000, 2, rc4030[4],
rc4030_opaque, rc4030_dma_memory_rw);
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 104874f2f8..e674e454bd 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -692,7 +692,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
nb_nics1 = NE2000_NB_MAX;
for(i = 0; i < nb_nics1; i++) {
if (nd_table[i].model == NULL) {
- nd_table[i].model = "ne2k_isa";
+ nd_table[i].model = qemu_strdup("ne2k_isa");
}
if (strcmp(nd_table[i].model, "ne2k_isa") == 0) {
isa_ne2000_init(ne2000_io[i], ne2000_irq[i], &nd_table[i]);