VirtualBox

Changeset 51254 in vbox for trunk/include/VBox


Ignore:
Timestamp:
May 15, 2014 8:00:46 AM (11 years ago)
Author:
vboxsync
Message:

Additions/SharedFolders: fixed ShflStringInitBuffer(), do really use this function for initializing the SHFLSTRING content; some cosmetcis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/shflsvc.h

    r51250 r51254  
    177177DECLINLINE(uint32_t) ShflStringSizeOfBuffer(PCSHFLSTRING pString)
    178178{
    179     return pString? sizeof (SHFLSTRING) - sizeof (pString->String) + pString->u16Size: 0;
     179    return pString ? sizeof(SHFLSTRING) - sizeof(pString->String) + pString->u16Size : 0;
    180180}
    181181
    182182DECLINLINE(uint32_t) ShflStringLength(PCSHFLSTRING pString)
    183183{
    184     return pString? pString->u16Length: 0;
     184    return pString ? pString->u16Length : 0;
    185185}
    186186
     
    188188{
    189189    PSHFLSTRING pString = NULL;
    190 
    191     uint32_t u32HeaderSize = sizeof (SHFLSTRING) - sizeof (pString->String);
    192 
    193     /* Check that the buffer size is big enough to hold a zero sized string
     190    const uint32_t u32HeaderSize = sizeof(SHFLSTRING);
     191
     192    /*
     193     * Check that the buffer size is big enough to hold a zero sized string
    194194     * and is not too big to fit into 16 bit variables.
    195195     */
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