VirtualBox

Changeset 25000 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Nov 26, 2009 2:22:44 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Fixed -Wshadow warnings, found two bugs in error paths.

Location:
trunk/src/VBox/Runtime/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/env-generic.cpp

    r21337 r25000  
    245245            for (size_t iVar = 0; iVar < cVars; iVar++)
    246246            {
    247                 int rc = RTStrCurrentCPToUtf8(&pIntEnv->papszEnv[iVar], papszEnv[iVar]);
    248                 if (RT_FAILURE(rc))
     247                int rc2 = RTStrCurrentCPToUtf8(&pIntEnv->papszEnv[iVar], papszEnv[iVar]);
     248                if (RT_FAILURE(rc2))
    249249                {
    250250                    pIntEnv->cVars = iVar;
    251251                    RTEnvDestroy(pIntEnv);
    252                     return rc;
     252                    return rc2;
    253253                }
    254254            }
     
    265265                    pIntEnv->cVars = iVar;
    266266                    RTEnvDestroy(pIntEnv);
    267                     return rc;
     267                    return VERR_NO_STR_MEMORY;
    268268                }
    269269                pIntEnv->papszEnv[iVar] = pszVar;
  • trunk/src/VBox/Runtime/generic/uuid-generic.cpp

    r21337 r25000  
    324324RTDECL(int)  RTUuidToUtf16(PCRTUUID pUuid, PRTUTF16 pwszString, size_t cwcString)
    325325{
    326     static const char g_achDigits[17] = "0123456789abcdef";
    327326    uint32_t u32TimeLow;
    328327    unsigned u;
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