VirtualBox

Changeset 69997 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 7, 2017 5:41:26 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119511
Message:

VBoxService: Fixed VGSvcLog ellipsis/va_list mixup, renaming it to VBoxSVCLogV to be clear about what it takes as an argument.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r69987 r69997  
    338338 *
    339339 * @param   pszFormat   The message text.
    340  * @param   ...         Format arguments.
    341  */
    342 void VGSvcLog(const char *pszFormat, ...)
     340 * @param   va          Format arguments.
     341 */
     342void VGSvcLogV(const char *pszFormat, va_list va)
    343343{
    344344#ifdef DEBUG
     
    347347    {
    348348#endif
    349         va_list args;
    350         va_start(args, pszFormat);
    351349        char *psz = NULL;
    352         RTStrAPrintfV(&psz, pszFormat, args);
    353         va_end(args);
     350        RTStrAPrintfV(&psz, pszFormat, va);
    354351
    355352        AssertPtr(psz);
     
    459456    if (iLevel <= g_cVerbosity)
    460457    {
    461         va_list args;
    462         va_start(args, pszFormat);
    463 
    464         VGSvcLog(pszFormat, args);
    465 
    466         va_end(args);
     458        va_list va;
     459        va_start(va, pszFormat);
     460        VGSvcLogV(pszFormat, va);
     461        va_end(va);
    467462    }
    468463}
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r69987 r69997  
    2828#include <iprt/critsect.h>
    2929#include <iprt/path.h> /* RTPATH_MAX */
     30#include <iprt/stdarg.h>
    3031
    3132#include <VBox/VBoxGuestLib.h>
     
    185186extern void                     VGSvcVerbose(unsigned iLevel, const char *pszFormat, ...);
    186187extern int                      VGSvcLogCreate(const char *pszLogFile);
    187 extern void                     VGSvcLog(const char *pszFormat, ...);
     188extern void                     VGSvcLogV(const char *pszFormat, va_list va);
    188189extern void                     VGSvcLogDestroy(void);
    189190extern int                      VGSvcArgUInt32(int argc, char **argv, const char *psz, int *pi, uint32_t *pu32,
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp

    r69995 r69997  
    259259    if (iLevel <= g_cTimeSyncVerbosity)
    260260    {
    261         va_list args;
    262         va_start(args, pszFormat);
    263 
    264         VGSvcLog(pszFormat, args);
    265 
    266         va_end(args);
     261        va_list va;
     262        va_start(va, pszFormat);
     263        VGSvcLogV(pszFormat, va);
     264        va_end(va);
    267265    }
    268266}
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