VirtualBox

Ignore:
Timestamp:
Oct 26, 2010 12:27:50 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67055
Message:

*: Fixes for incorrect RTStrAPrintf usage (it does NOT return an IPRT status code) and the odd bugs nearby.

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r33294 r33464  
    13231323                    /* Refer to the correct partition and use offset 0. */
    13241324                    char *psz;
    1325                     vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.c_str(),
    1326                                        partitions.aPartitions[i].uIndex);
    1327                     if (RT_FAILURE(vrc))
     1325                    RTStrAPrintf(&psz, "%s%u", rawdisk.c_str(),
     1326                                 partitions.aPartitions[i].uIndex);
     1327                    if (!psz)
    13281328                    {
     1329                        vrc = VERR_NO_STR_MEMORY;
    13291330                        RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
    1330                                  partitions.aPartitions[i].uIndex, vrc);
     1331                                   partitions.aPartitions[i].uIndex, vrc);
    13311332                        goto out;
    13321333                    }
     
    13361337                    /* Refer to the correct partition and use offset 0. */
    13371338                    char *psz;
    1338                     vrc = RTStrAPrintf(&psz, "%ss%u", rawdisk.c_str(),
    1339                                        partitions.aPartitions[i].uIndex);
    1340                     if (RT_FAILURE(vrc))
     1339                    RTStrAPrintf(&psz, "%ss%u", rawdisk.c_str(),
     1340                                 partitions.aPartitions[i].uIndex);
     1341                    if (!psz)
    13411342                    {
     1343                        vrc = VERR_NO_STR_MEMORY;
    13421344                        RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
    13431345                                 partitions.aPartitions[i].uIndex, vrc);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r33448 r33464  
    3737#include <iprt/asm.h>
    3838#include <iprt/dir.h>
     39#include <iprt/file.h>
    3940#include <iprt/isofs.h>
    4041#include <iprt/getopt.h>
     
    746747                    if (RTStrAPrintf(&pszFileSource, "%s%s%s",
    747748                                     pszRootDir, pszSubDir ? pszSubDir : "",
    748                                      DirEntry.szName))
     749                                     DirEntry.szName) >= 0)
    749750                    {
    750751                        if (!RTStrAPrintf(&pszFileDest, "%s%s",
    751752                                          pszSubDir ? pszSubDir : "",
    752                                           DirEntry.szName))
     753                                          DirEntry.szName) >= 0)
    753754                        {
    754755                            rc = VERR_NO_MEMORY;
Note: See TracChangeset for help on using the changeset viewer.

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