VirtualBox

Changeset 14740 in vbox


Ignore:
Timestamp:
Nov 27, 2008 7:57:49 PM (16 years ago)
Author:
vboxsync
Message:

some changes missed during last split

File:
1 edited

Legend:

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

    r14736 r14740  
    245245    com::SafeArray<BSTR>          baseMetrics;
    246246    com::SafeIfaceArray<IUnknown> objects;
    247     ULONG period = 1, samples = 1;
     247    uint32_t period = 1, samples = 1;
    248248    bool listMatches = false;
    249249    int i;
     
    255255            if (argc <= i + 1)
    256256                return errorArgument("Missing argument to '%s'", argv[i]);
    257             char *endptr = NULL;
    258             period = strtoul (argv[++i], &endptr, 10);
    259             if (!endptr || *endptr || !period)
     257            if (   VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &period)
     258                || !period)
    260259                return errorArgument("Invalid value for 'period' parameter: '%s'", argv[i]);
    261260        }
     
    264263            if (argc <= i + 1)
    265264                return errorArgument("Missing argument to '%s'", argv[i]);
    266             char *endptr = NULL;
    267             samples = strtoul (argv[++i], &endptr, 10);
    268             if (!endptr || *endptr)
     265            if (   VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &samples)
     266                || !samples)
    269267                return errorArgument("Invalid value for 'samples' parameter: '%s'", argv[i]);
    270268        }
     
    413411    com::SafeArray<BSTR>          baseMetrics;
    414412    com::SafeIfaceArray<IUnknown> objects;
    415     ULONG period = 1, samples = 1;
     413    uint32_t period = 1, samples = 1;
    416414    bool isDetached = false, listMatches = false;
    417415    int i;
     
    422420            if (argc <= i + 1)
    423421                return errorArgument("Missing argument to '%s'", argv[i]);
    424             char *endptr = NULL;
    425             period = strtoul (argv[++i], &endptr, 10);
    426             if (!endptr || *endptr || !period)
     422            if (   VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &period)
     423                || !period)
    427424                return errorArgument("Invalid value for 'period' parameter: '%s'", argv[i]);
    428425        }
     
    431428            if (argc <= i + 1)
    432429                return errorArgument("Missing argument to '%s'", argv[i]);
    433             char *endptr = NULL;
    434             samples = strtoul (argv[++i], &endptr, 10);
    435             if (!endptr || *endptr || !samples)
     430            if (   VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &samples)
     431                || !samples)
    436432                return errorArgument("Invalid value for 'samples' parameter: '%s'", argv[i]);
    437433        }
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