VirtualBox

Ignore:
Timestamp:
Feb 8, 2024 3:27:12 PM (10 months ago)
Author:
vboxsync
Message:

Re-applied r161549 again (Got rid of a lot of deprecated strcpy / strcat calls; now using the IPRT pendants (found by Parfait)), left out some stuff which wasn't wanted, less bloated version of DrvAudio.cpp. bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r103275 r103285  
    6262    int rcRet = 0;
    6363    int i;
    64     int rc;
    6564    int cIterations = argc > 1 ? RTStrToUInt32(argv[1]) : 32;
    6665    if (cIterations == 0)
     
    7271    RTR3InitExe(argc, &argv, 0);
    7372    PSUPDRVSESSION pSession;
    74     rc = SUPR3Init(&pSession);
     73    int rc = SUPR3Init(&pSession);
    7574    rcRet += rc != 0;
    7675    RTPrintf("tstInt: SUPR3Init -> rc=%Rrc\n", rc);
    7776    char szFile[RTPATH_MAX];
    78     if (!rc)
    79     {
    80         rc = RTPathExecDir(szFile, sizeof(szFile) - sizeof("/VMMR0.r0"));
    81     }
     77    if (RT_SUCCESS(rc))
     78        rc = RTPathExecDir(szFile, sizeof(szFile));
     79
    8280    char szAbsFile[RTPATH_MAX];
    8381    if (RT_SUCCESS(rc))
    8482    {
    85         strcat(szFile, "/VMMR0.r0");
    86         rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile));
     83        rc = RTPathAppend(szFile, sizeof(szFile), "VMMR0.r0");
     84        if (RT_SUCCESS(rc))
     85            rc = RTPathAbs(szFile, szAbsFile, sizeof(szAbsFile));
    8786    }
    8887    if (RT_SUCCESS(rc))
     
    236235    }
    237236
     237    if (RT_FAILURE(rc))
     238        RTPrintf("Failed with rc=%Rrc\n", rc);
     239
    238240    return !!rc;
    239241}
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