Commit 309e60bd07c8b5e89b285ed7ee9ce3240d7f9bfc
1 parent
9fea808a
Fix sun4m machine if MAX_FD != 2 (Herv�oussineau)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4001 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
hw/sun4m.c
... | ... | @@ -492,7 +492,7 @@ static void sun4m_hw_init(const struct hwdef *hwdef, int RAM_size, |
492 | 492 | |
493 | 493 | if (hwdef->fd_base != (target_phys_addr_t)-1) { |
494 | 494 | /* there is zero or one floppy drive */ |
495 | - fd[1] = fd[0] = NULL; | |
495 | + memset(fd, 0, sizeof(fd)); | |
496 | 496 | index = drive_get_index(IF_FLOPPY, 0, 0); |
497 | 497 | if (index != -1) |
498 | 498 | fd[0] = drives_table[index].bdrv; | ... | ... |