VirtualBox

Changeset 93360 in vbox


Ignore:
Timestamp:
Jan 20, 2022 11:28:10 AM (3 years ago)
Author:
vboxsync
Message:

Add/x11/display-drm: Save 4077 - sizeof(const char *) bytes by changing g_szPidFile[RTPATH_MAX] to g_pszPidFile. bugref:9637

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-drm.cpp

    r93115 r93360  
    127127
    128128/** Path to the PID file. */
    129 static const char g_szPidFile[RTPATH_MAX] = "/var/run/VBoxDRMClient";
     129static const char *g_pszPidFile = "/var/run/VBoxDRMClient";
    130130
    131131/** Global flag which is triggered when service requested to shutdown. */
     
    546546
    547547    /* Check PID file before attempting to initialize anything. */
    548     rc = VbglR3PidFile(g_szPidFile, &hPidFile);
     548    rc = VbglR3PidFile(g_pszPidFile, &hPidFile);
    549549    if (rc == VERR_FILE_LOCK_VIOLATION)
    550550    {
     
    552552        return RTEXITCODE_SUCCESS;
    553553    }
    554     else if (RT_FAILURE(rc))
     554    if (RT_FAILURE(rc))
    555555    {
    556556        VBClLogError("VBoxDRMClient: unable to lock PID file (%Rrc), exiting\n", rc);
     
    600600
    601601    VBClLogInfo("VBoxDRMClient: releasing PID file lock\n");
    602     VbglR3ClosePidFile(g_szPidFile, hPidFile);
     602    VbglR3ClosePidFile(g_pszPidFile, hPidFile);
    603603
    604604    return rc == 0 ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;
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