diff --git a/hw/sun4m.c b/hw/sun4m.c index 55abfe8b7da99b6f71bef97ec620a554dfbf346d..e4717c485c00d79430d681c5faaf9d04ad6228c6 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -492,7 +492,7 @@ static void sun4m_hw_init(const struct hwdef *hwdef, int RAM_size, 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)); index = drive_get_index(IF_FLOPPY, 0, 0); if (index != -1) fd[0] = drives_table[index].bdrv;