VirtualBox

Changeset 48162 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 29, 2013 2:27:01 PM (11 years ago)
Author:
vboxsync
Message:

Storage/DevFdc: Initialize 'len' to zero at the beginning, safer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevFdc.cpp

    r48161 r48162  
    15171517#ifdef VBOX
    15181518    int rc;
    1519     uint32_t len, start_pos, rel_pos;
     1519    uint32_t len = 0;
     1520    uint32_t start_pos, rel_pos;
    15201521#else
    15211522    int len, start_pos, rel_pos;
     
    15441545        else
    15451546            fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM, 0x00, 0x00);
    1546         len = 0;
     1547        Assert(len == 0);
    15471548        goto transfer_error;
    15481549    }
     
    15581559                fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, FD_SR1_NW,
    15591560                                     0x00);
    1560                 len = 0;
     1561                Assert(len == 0);
    15611562                goto transfer_error;
    15621563            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette