Skip to contentSkip to conversation

Remove dead code

PATCH New Amit Shah 1 participant 1 message Jun 3, 2009

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

PATCH 1/1 Remove dead code

vl.c contains some dead code that initialises a 'label' string with the name of the char device being initialised. This is unused.

---
 vl.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
vl.c +0 -6
index f8c0d00..1d1ea64 100644
@@ -6007,8 +6007,6 @@ int main(int argc, char **argv, char **envp)
     for(i = 0; i < MAX_SERIAL_PORTS; i++) {
         const char *devname = serial_devices[i];
         if (devname && strcmp(devname, "none")) {
-            char label[32];
-            snprintf(label, sizeof(label), "serial%d", i);
             if (strstart(devname, "vc", 0))
                 qemu_chr_printf(serial_hds[i], "serial%d console\r\n", i);
         }
@@ -6017,8 +6015,6 @@ int main(int argc, char **argv, char **envp)
     for(i = 0; i < MAX_PARALLEL_PORTS; i++) {
         const char *devname = parallel_devices[i];
         if (devname && strcmp(devname, "none")) {
-            char label[32];
-            snprintf(label, sizeof(label), "parallel%d", i);
             if (strstart(devname, "vc", 0))
                 qemu_chr_printf(parallel_hds[i], "parallel%d console\r\n", i);
         }
@@ -6027,8 +6023,6 @@ int main(int argc, char **argv, char **envp)
     for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
         const char *devname = virtio_consoles[i];
         if (virtcon_hds[i] && devname) {
-            char label[32];
-            snprintf(label, sizeof(label), "virtcon%d", i);
             if (strstart(devname, "vc", 0))
                 qemu_chr_printf(virtcon_hds[i], "virtio console%d\r\n", i);
         }
Signature · 1 line
1.6.0.6