qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [6267] Fix segfault


From: Blue Swirl
Subject: [Qemu-devel] [6267] Fix segfault
Date: Sat, 10 Jan 2009 14:38:01 +0000

Revision: 6267
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6267
Author:   blueswir1
Date:     2009-01-10 14:38:00 +0000 (Sat, 10 Jan 2009)

Log Message:
-----------
Fix segfault

Modified Paths:
--------------
    trunk/hw/sun4m.c

Modified: trunk/hw/sun4m.c
===================================================================
--- trunk/hw/sun4m.c    2009-01-10 11:33:32 UTC (rev 6266)
+++ trunk/hw/sun4m.c    2009-01-10 14:38:00 UTC (rev 6267)
@@ -533,8 +533,9 @@
     tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
              hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
 
-    if (nd_table[0].model == NULL
-        || strcmp(nd_table[0].model, "lance") == 0) {
+    if (nd_table[0].model == NULL)
+        nd_table[0].model = "lance";
+    if (strcmp(nd_table[0].model, "lance") == 0) {
         lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
     } else if (strcmp(nd_table[0].model, "?") == 0) {
         fprintf(stderr, "qemu: Supported NICs: lance\n");
@@ -1325,8 +1326,9 @@
     tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
              hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
 
-    if (nd_table[0].model == NULL
-        || strcmp(nd_table[0].model, "lance") == 0) {
+    if (nd_table[0].model == NULL)
+        nd_table[0].model = "lance";
+    if (strcmp(nd_table[0].model, "lance") == 0) {
         lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
     } else if (strcmp(nd_table[0].model, "?") == 0) {
         fprintf(stderr, "qemu: Supported NICs: lance\n");
@@ -1540,8 +1542,9 @@
     tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
              hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
 
-    if (nd_table[0].model == NULL
-        || strcmp(nd_table[0].model, "lance") == 0) {
+    if (nd_table[0].model == NULL)
+        nd_table[0].model = "lance";
+    if (strcmp(nd_table[0].model, "lance") == 0) {
         lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
     } else if (strcmp(nd_table[0].model, "?") == 0) {
         fprintf(stderr, "qemu: Supported NICs: lance\n");






reply via email to

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