VirtualBox

Changeset 47782 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Aug 16, 2013 8:01:14 AM (11 years ago)
Author:
vboxsync
Message:

IPRT/RTFileModeToFlags.cpp: Check for unknown disposition mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp

    r47762 r47782  
    308308    else if (!RTStrCmp(pszCur, "ot"))
    309309        uMode |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE;
     310    else
     311        rc = VERR_INVALID_PARAMETER;
    310312
    311313    /* No action mask set? */
    312     if ((uMode & RTFILE_O_ACTION_MASK) == 0)
     314    if (   RT_SUCCESS(rc)
     315        && (uMode & RTFILE_O_ACTION_MASK) == 0)
    313316        rc = VERR_INVALID_PARAMETER;
    314317
    315     if (RT_FAILURE(rc))
    316         return rc;
    317 
    318318    /** @todo Handle sharing mode. */
    319319
    320     *puMode = uMode;
     320    if (RT_SUCCESS(rc))
     321        *puMode = uMode;
     322
    321323    return rc;
    322324}
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