VirtualBox

Changeset 27905 in vbox


Ignore:
Timestamp:
Mar 31, 2010 2:19:30 PM (14 years ago)
Author:
vboxsync
Message:

Main: coding style

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImplExport.cpp

    r27895 r27905  
    15931593
    15941594        vrc = RTPathExists(strTmpOvf.c_str()); /* Paranoid check */
    1595         if(RT_FAILURE(vrc))
     1595        if (RT_FAILURE(vrc))
    15961596            throw setError(VBOX_E_FILE_ERROR,
    15971597                           tr("Cannot find source file '%s'"), strTmpOvf.c_str());
     
    16211621                strTargetFilePath.append(strTargetFileNameOnly);
    16221622                vrc = RTPathExists(strTargetFilePath.c_str()); /* Paranoid check */
    1623                 if(RT_FAILURE(vrc))
     1623                if (RT_FAILURE(vrc))
    16241624                    throw setError(VBOX_E_FILE_ERROR,
    16251625                                   tr("Cannot find source file '%s'"), strTargetFilePath.c_str());
     
    16291629        /* Next we have to upload the OVF & all disk images */
    16301630        vrc = RTS3Create(&hS3, pTask->locInfo.strUsername.c_str(), pTask->locInfo.strPassword.c_str(), pTask->locInfo.strHostname.c_str(), "virtualbox-agent/"VBOX_VERSION_STRING);
    1631         if(RT_FAILURE(vrc))
     1631        if (RT_FAILURE(vrc))
    16321632            throw setError(VBOX_E_IPRT_ERROR,
    16331633                           tr("Cannot create S3 service handler"));
     
    16451645            if (RT_FAILURE(vrc))
    16461646            {
    1647                 if(vrc == VERR_S3_CANCELED)
     1647                if (vrc == VERR_S3_CANCELED)
    16481648                    break;
    1649                 else if(vrc == VERR_S3_ACCESS_DENIED)
     1649                else if (vrc == VERR_S3_ACCESS_DENIED)
    16501650                    throw setError(E_ACCESSDENIED,
    16511651                                   tr("Cannot upload file '%s' to S3 storage server (Access denied). Make sure that your credentials are right. Also check that your host clock is properly synced"), pszFilename);
    1652                 else if(vrc == VERR_S3_NOT_FOUND)
     1652                else if (vrc == VERR_S3_NOT_FOUND)
    16531653                    throw setError(VBOX_E_FILE_ERROR,
    16541654                                   tr("Cannot upload file '%s' to S3 storage server (File not found)"), pszFilename);
     
    16721672        {
    16731673            vrc = RTFileDelete(pszFilePath);
    1674             if(RT_FAILURE(vrc))
     1674            if (RT_FAILURE(vrc))
    16751675                rc = setError(VBOX_E_FILE_ERROR,
    16761676                              tr("Cannot delete file '%s' (%Rrc)"), pszFilePath, vrc);
     
    16811681    {
    16821682        vrc = RTDirRemove(pszTmpDir);
    1683         if(RT_FAILURE(vrc))
     1683        if (RT_FAILURE(vrc))
    16841684            rc = setError(VBOX_E_FILE_ERROR,
    16851685                          tr("Cannot delete temporary directory '%s' (%Rrc)"), pszTmpDir, vrc);
  • trunk/src/VBox/Main/ApplianceImplImport.cpp

    r27904 r27905  
    759759        /* Next we have to download the OVF */
    760760        vrc = RTS3Create(&hS3, pTask->locInfo.strUsername.c_str(), pTask->locInfo.strPassword.c_str(), pTask->locInfo.strHostname.c_str(), "virtualbox-agent/"VBOX_VERSION_STRING);
    761         if(RT_FAILURE(vrc))
     761        if (RT_FAILURE(vrc))
    762762            throw setError(VBOX_E_IPRT_ERROR,
    763763                           tr("Cannot create S3 service handler"));
     
    769769        if (RT_FAILURE(vrc))
    770770        {
    771             if(vrc == VERR_S3_CANCELED)
     771            if (vrc == VERR_S3_CANCELED)
    772772                throw S_OK; /* todo: !!!!!!!!!!!!! */
    773             else if(vrc == VERR_S3_ACCESS_DENIED)
     773            else if (vrc == VERR_S3_ACCESS_DENIED)
    774774                throw setError(E_ACCESSDENIED,
    775775                               tr("Cannot download file '%s' from S3 storage server (Access denied). Make sure that your credentials are right. Also check that your host clock is properly synced"), pszFilename);
    776             else if(vrc == VERR_S3_NOT_FOUND)
     776            else if (vrc == VERR_S3_NOT_FOUND)
    777777                throw setError(VBOX_E_FILE_ERROR,
    778778                               tr("Cannot download file '%s' from S3 storage server (File not found)"), pszFilename);
     
    817817    {
    818818        vrc = RTFileDelete(strTmpOvf.c_str());
    819         if(RT_FAILURE(vrc))
     819        if (RT_FAILURE(vrc))
    820820            rc = setError(VBOX_E_FILE_ERROR,
    821821                          tr("Cannot delete file '%s' (%Rrc)"), strTmpOvf.c_str(), vrc);
     
    825825    {
    826826        vrc = RTDirRemove(pszTmpDir);
    827         if(RT_FAILURE(vrc))
     827        if (RT_FAILURE(vrc))
    828828            rc = setError(VBOX_E_FILE_ERROR,
    829829                          tr("Cannot delete temporary directory '%s' (%Rrc)"), pszTmpDir, vrc);
     
    18451845        /* Next we have to download the disk images */
    18461846        vrc = RTS3Create(&hS3, pTask->locInfo.strUsername.c_str(), pTask->locInfo.strPassword.c_str(), pTask->locInfo.strHostname.c_str(), "virtualbox-agent/"VBOX_VERSION_STRING);
    1847         if(RT_FAILURE(vrc))
     1847        if (RT_FAILURE(vrc))
    18481848            throw setError(VBOX_E_IPRT_ERROR,
    18491849                           tr("Cannot create S3 service handler"));
     
    18641864            if (RT_FAILURE(vrc))
    18651865            {
    1866                 if(vrc == VERR_S3_CANCELED)
     1866                if (vrc == VERR_S3_CANCELED)
    18671867                    throw S_OK; /* todo: !!!!!!!!!!!!! */
    1868                 else if(vrc == VERR_S3_ACCESS_DENIED)
     1868                else if (vrc == VERR_S3_ACCESS_DENIED)
    18691869                    throw setError(E_ACCESSDENIED,
    18701870                                   tr("Cannot download file '%s' from S3 storage server (Access denied). Make sure that your credentials are right. Also check that your host clock is properly synced"), pszFilename);
    1871                 else if(vrc == VERR_S3_NOT_FOUND)
     1871                else if (vrc == VERR_S3_NOT_FOUND)
    18721872                    throw setError(VBOX_E_FILE_ERROR,
    18731873                                   tr("Cannot download file '%s' from S3 storage server (File not found)"), pszFilename);
     
    18931893        else if (RT_FAILURE(vrc))
    18941894        {
    1895             if(vrc == VERR_S3_CANCELED)
     1895            if (vrc == VERR_S3_CANCELED)
    18961896                throw S_OK; /* todo: !!!!!!!!!!!!! */
    1897             else if(vrc == VERR_S3_NOT_FOUND)
     1897            else if (vrc == VERR_S3_NOT_FOUND)
    18981898                vrc = VINF_SUCCESS; /* Not found is ok */
    1899             else if(vrc == VERR_S3_ACCESS_DENIED)
     1899            else if (vrc == VERR_S3_ACCESS_DENIED)
    19001900                throw setError(E_ACCESSDENIED,
    19011901                               tr("Cannot download file '%s' from S3 storage server (Access denied). Make sure that your credentials are right. Also check that your host clock is properly synced"), pszFilename);
     
    19421942        {
    19431943            vrc = RTFileDelete(pszFilePath);
    1944             if(RT_FAILURE(vrc))
     1944            if (RT_FAILURE(vrc))
    19451945                rc = setError(VBOX_E_FILE_ERROR,
    19461946                              tr("Cannot delete file '%s' (%Rrc)"), pszFilePath, vrc);
     
    19511951    {
    19521952        vrc = RTDirRemove(pszTmpDir);
    1953         if(RT_FAILURE(vrc))
     1953        if (RT_FAILURE(vrc))
    19541954            rc = setError(VBOX_E_FILE_ERROR,
    19551955                          tr("Cannot delete temporary directory '%s' (%Rrc)"), pszTmpDir, vrc);
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r27889 r27905  
    32143214    unsigned id = (unsigned)pCommand->iDisplay;
    32153215    int rc = VINF_SUCCESS;
    3216     if(id < mcMonitors)
     3216    if (id < mcMonitors)
    32173217    {
    32183218        IFramebuffer *pFramebuffer = maFramebuffers[id].pFramebuffer;
     
    32243224
    32253225            HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE*)pCommand);
    3226             if(FAILED(hr))
     3226            if (FAILED(hr))
    32273227            {
    32283228                rc = (hr == E_NOTIMPL) ? VERR_NOT_IMPLEMENTED : VERR_GENERAL_FAILURE;
     
    32413241    }
    32423242
    3243     if(RT_FAILURE(rc))
     3243    if (RT_FAILURE(rc))
    32443244    {
    32453245        /* tell the guest the command is complete */
  • trunk/src/VBox/Main/VFSExplorerImpl.cpp

    r27607 r27905  
    300300            throw setError(VBOX_E_FILE_ERROR, tr ("Can't open directory '%s' (%Rrc)"), pszPath, vrc);
    301301
    302         if(aTask->progress)
     302        if (aTask->progress)
    303303            aTask->progress->SetCurrentOperationProgress(33);
    304304        RTDIRENTRY entry;
     
    314314            }
    315315        }
    316         if(aTask->progress)
     316        if (aTask->progress)
    317317            aTask->progress->SetCurrentOperationProgress(66);
    318318    }
     
    328328        RTDirClose(pDir);
    329329
    330     if(aTask->progress)
     330    if (aTask->progress)
    331331        aTask->progress->SetCurrentOperationProgress(99);
    332332
     
    373373            if (RT_FAILURE(vrc))
    374374                throw setError(VBOX_E_FILE_ERROR, tr ("Can't delete file '%s' (%Rrc)"), szPath, vrc);
    375             if(aTask->progress)
     375            if (aTask->progress)
    376376                aTask->progress->SetCurrentOperationProgress((ULONG)(fPercentStep * i));
    377377        }
     
    499499            if (RT_FAILURE(vrc))
    500500                throw setError(VBOX_E_FILE_ERROR, tr ("Can't delete file '%s' (%Rrc)"), (*it).c_str(), vrc);
    501             if(aTask->progress)
     501            if (aTask->progress)
    502502                aTask->progress->SetCurrentOperationProgress((ULONG)(fPercentStep * i));
    503503        }
  • trunk/src/VBox/Main/darwin/HostPowerDarwin.cpp

    r22648 r27905  
    179179    if (CFArrayGetCount (pSources) > 0)
    180180    {
    181         for(int i = 0; i < CFArrayGetCount (pSources); ++i)
     181        for (int i = 0; i < CFArrayGetCount (pSources); ++i)
    182182        {
    183183            pSource = IOPSGetPowerSourceDescription (pBlob, CFArrayGetValueAtIndex (pSources, i));
    184184            /* If the source is empty skip over to the next one. */
    185             if(!pSource)
     185            if (!pSource)
    186186                continue;
    187187            /* Skip all power sources which are currently not present like a
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