VirtualBox

Ignore:
Timestamp:
Jul 12, 2020 1:11:33 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139245
Message:

Main/xpcom/server.cpp: Status code type mixup. Fixed getpid()->uint64_t complained and eliminated a RTFileWrite call. bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/xpcom/server.cpp

    r82968 r85268  
    164164                int vrc = RTTimerLRStart(sTimer, gShutdownDelayMs * RT_NS_1MS_64);
    165165                AssertRC(vrc);
    166                 timerStarted = !!(SUCCEEDED(vrc));
     166                timerStarted = RT_SUCCESS(vrc);
    167167            }
    168168            else
     
    913913            if (RT_SUCCESS(vrc))
    914914            {
    915                 char szBuf[32];
    916                 const char *lf = "\n";
    917                 RTStrFormatNumber(szBuf, getpid(), 10, 0, 0, 0);
    918                 RTFileWrite(hPidFile, szBuf, strlen(szBuf), NULL);
    919                 RTFileWrite(hPidFile, lf, strlen(lf), NULL);
     915                char szBuf[64];
     916                size_t cchToWrite = RTStrPrintf(szBuf, sizeof(szBuf), "%ld\n", (long)getpid());
     917                RTFileWrite(hPidFile, szBuf, cchToWrite, NULL);
    920918                RTFileClose(hPidFile);
    921919            }
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