Commit ce802585a9c18d93fc01fed320a3e066f52ef879

Authored by blueswir1
1 parent 6c173b3c

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5810 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 1 deletions
hw/sun4m.c
... ... @@ -1589,7 +1589,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
1589 1589  
1590 1590 if (hwdef->fd_base != (target_phys_addr_t)-1) {
1591 1591 /* there is zero or one floppy drive */
1592   - fd[1] = fd[0] = NULL;
  1592 + memset(fd, 0, sizeof(fd));
1593 1593 drive_index = drive_get_index(IF_FLOPPY, 0, 0);
1594 1594 if (drive_index != -1)
1595 1595 fd[0] = drives_table[drive_index].bdrv;
... ...