Skip to contentSkip to conversation

[5810] Don't rely on the fact that MAX_FD is 2 (Herve Poussineau)

Qemu-devel Blue Swirl 1 participant 1 message Nov 29, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5810

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5810
Author:   blueswir1
Date:     2008-11-29 16:42:40 +0000 (Sat, 29 Nov 2008)

Log Message:
-----------
Don't rely on the fact that MAX_FD is 2 (Herve Poussineau)

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

Modified: trunk/hw/sun4m.c
===================================================================

hw/sun4m.c +1 -1
@@ -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;