VirtualBox

Changeset 93334 in vbox for trunk


Ignore:
Timestamp:
Jan 18, 2022 10:38:13 PM (3 years ago)
Author:
vboxsync
Message:

Installer/win/InstallHelper: Don't use RT_ZERO on hProcess in procRun, we've got NIL_XXXX defines for such things. Removed unused cArgs parameter for procRun since it wasn't even correct (it counted the NULL).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp

    r93333 r93334  
    184184 * @param   pszImage            Absolute path of executable to run.
    185185 * @param   papszArgs           Pointer to command line arguments to use for calling the executable.
    186  * @param   cArgs               Number of command line arguments in \a papszArgs.
    187186 */
    188 static int procRun(MSIHANDLE hModule, const char *pszImage, const char * const *papszArgs, size_t cArgs)
    189 {
    190     RT_NOREF(cArgs);
    191 
    192     RTPROCESS Process;
    193     RT_ZERO(Process);
    194 
    195     uint32_t fProcess = 0;
    196 #ifndef DEBUG
    197     fProcess |= RTPROC_FLAGS_HIDDEN;
     187static int procRun(MSIHANDLE hModule, const char *pszImage, const char * const *papszArgs)
     188{
     189#ifdef DEBUG
     190    uint32_t  const fProcess = 0;
     191#else
     192    uint32_t  const fProcess = RTPROC_FLAGS_HIDDEN;
    198193#endif
    199 
     194    RTPROCESS       Process  = NIL_RTPROCESS;
    200195    int rc = RTProcCreate(pszImage, papszArgs, RTENV_DEFAULT, fProcess, &Process);
    201196    if (RT_SUCCESS(rc))
     
    352347    const char *papszArgs[] = { pcszPythonExe, "-c", "import win32api", NULL};
    353348
    354     int rc = procRun(hModule, pcszPythonExe, papszArgs, RT_ELEMENTS(papszArgs));
     349    int rc = procRun(hModule, pcszPythonExe, papszArgs);
    355350    if (RT_SUCCESS(rc))
    356351        logStringF(hModule, "checkPythonDependencies: win32api found\n");
     
    477472                const char *papszArgs[] = { pszPythonExe, "vboxapisetup.py", "install", NULL};
    478473
    479                 rc = procRun(hModule, pszPythonExe, papszArgs, RT_ELEMENTS(papszArgs));
     474                rc = procRun(hModule, pszPythonExe, papszArgs);
    480475                if (RT_SUCCESS(rc))
    481476                    logStringF(hModule, "InstallPythonAPI: Installation of vboxapisetup.py successful\n");
     
    503498        const char *papszArgs[] = { pszPythonExe, "-c", "from vboxapi import VirtualBoxManager", NULL};
    504499
    505         rc = procRun(hModule, pszPythonExe, papszArgs, RT_ELEMENTS(papszArgs));
     500        rc = procRun(hModule, pszPythonExe, papszArgs);
    506501        if (RT_SUCCESS(rc))
    507502            logStringF(hModule, "InstallPythonAPI: VBox API looks good.\n");
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