Skip to contentSkip to conversation

Sparc: Don't rely on the fact that MAX_FD is 2

PATCH Applied Hervé Poussineau 2 participants 2 messages Nov 29, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Sparc: Don't rely on the fact that MAX_FD is 2

Don't rely on the fact that MAX_FD is 2

Hervé

sun4m.c +1 -1
Index: hw/sun4m.c
===================================================================
@@ -1589,7 +1589,7 @@
 
     if (hwdef->fd_base != (target_phys_addr_t)-1) {
         /* there is zero or one floppy drive */
-        fd[1] = fd[0] = NULL;
+        memset(fd, 0, sizeof(fd));
         drive_index = drive_get_index(IF_FLOPPY, 0, 0);
         if (drive_index != -1)
             fd[0] = drives_table[drive_index].bdrv;
Applied
#1 lore raw
Quoted 1 line · Hervé Poussineau

Don't rely on the fact that MAX_FD is 2

Thanks, applied as r5810.