VirtualBox

Changeset 77622 in vbox for trunk/src


Ignore:
Timestamp:
Mar 8, 2019 3:37:25 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129250
Message:

Bug fix/ syntax cleanup of AllocationBlockSize / createmedium property creation code

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r77608 r77622  
    1 #include <signal.h>
    21/* $Id$ */
    32/** @file
     
    5150    MEDIUMCATEGORY_FLOPPY
    5251} MEDIUMCATEGORY;
     52
     53
    5354
    5455// funcs
     
    478479    {
    479480        if (pMediumProps)
    480             for (PMEDIUMPROPERTY pProp = pMediumProps; pProp; pProp = pProp->next)
     481            for (PMEDIUMPROPERTY pProp = pMediumProps; pProp;)
     482            {
    481483                CHECK_ERROR(pMedium, SetProperty(Bstr(pProp->key).raw(), Bstr(pProp->value).raw()));
     484                PMEDIUMPROPERTY next = pProp->next;
     485                RTMemFree(pProp);
     486                pProp = next;
     487            }
    482488        }
    483489
  • trunk/src/VBox/Storage/VDI.cpp

    r77607 r77622  
    4242static const char *vdiAllocationBlockSize = "1048576";
    4343
    44 static const VDCONFIGINFO vdiConfigInfo[] = {
    45     { "AllocationBlockSize",            vdiAllocationBlockSize,           VDCFGVALUETYPE_INTEGER,      0 }
     44static const VDCONFIGINFO vdiConfigInfo[] =
     45{
     46    { "AllocationBlockSize",            vdiAllocationBlockSize,           VDCFGVALUETYPE_INTEGER,      0 },
     47    { NULL,                             NULL,                             VDCFGVALUETYPE_INTEGER,      0 }
    4648};
    4749
     
    719721
    720722    PVDINTERFACECONFIG pImgCfg = VDIfConfigGet(pImage->pVDIfsImage);
    721     if (pImgCfg) {
     723    if (pImgCfg)
     724    {
    722725        rc = VDCFGQueryU32Def(pImgCfg, "AllocationBlockSize", &cbAllocationBlock, VDI_IMAGE_DEFAULT_BLOCK_SIZE);
    723726        if (RT_FAILURE(rc))
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