VirtualBox

Changeset 24320 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 4, 2009 11:38:15 AM (15 years ago)
Author:
vboxsync
Message:

more RT_ZERO()

Location:
trunk/src/VBox/Additions
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxGINA/Helper.cpp

    r22239 r24320  
    5353void credentialsReset(void)
    5454{
    55     memset(g_Username, '\0', sizeof(g_Username));
    56     memset(g_Password, '\0', sizeof(g_Password));
    57     memset(g_Domain, '\0', sizeof(g_Domain));
     55    RT_ZERO(g_Username);
     56    RT_ZERO(g_Password);
     57    RT_ZERO(g_Domain);
    5858}
    5959
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r13835 r24320  
    7979    VBoxGuestHGCMConnectInfo info;
    8080
    81     memset (&info, 0, sizeof (info));
     81    RT_ZERO (info);
    8282
    8383    info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
     
    116116    VBoxGuestHGCMDisconnectInfo info;
    117117
    118     memset (&info, 0, sizeof (info));
     118    RT_ZERO (info);
    119119
    120120    info.u32ClientID = pCtx->u32ClientID;
     
    787787    }
    788788
    789     memset (&gCtx, 0, sizeof (gCtx));
     789    RT_ZERO (gCtx);
    790790
    791791    gCtx.pEnv = pEnv;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp

    r21888 r24320  
    488488                                /* Single monitor NT. */
    489489                                DEVMODE devMode;
    490                                 memset (&devMode, 0, sizeof (devMode));
     490                                RT_ZERO(devMode);
    491491                                devMode.dmSize = sizeof(DEVMODE);
    492492
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r23057 r24320  
    405405    /* prepare the system tray icon */
    406406    NOTIFYICONDATA ndata;
    407     memset (&ndata, 0, sizeof (ndata));
     407    RT_ZERO (ndata);
    408408    ndata.cbSize           = NOTIFYICONDATA_V1_SIZE; // sizeof(NOTIFYICONDATA);
    409409    ndata.hWnd             = gToolWindow;
  • trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp

    r22562 r24320  
    651651
    652652    /* null out the table */
    653     memset(customModes, 0, sizeof(customModes));
     653    RT_ZERO(customModes);
    654654
    655655    do
     
    858858            {
    859859                RTPrintf("found mode at index %d\n", i);
    860                 memset(&customModes[i], 0, sizeof(customModes[i]));
     860                RZ_ZERO(customModes[i]);
    861861                break;
    862862            }
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Init.cpp

    r21461 r24320  
    138138    int rc = VINF_SUCCESS;
    139139
    140     memset(&g_vbgldata, 0, sizeof (VBGLDATA));
     140    RT_ZERO(g_vbgldata);
    141141
    142142    g_vbgldata.status = VbglStatusInitializing;
     
    159159    VbglPhysHeapTerminate ();
    160160
    161     memset(&g_vbgldata, 0, sizeof (VBGLDATA));
     161    RT_ZERO(g_vbgldata);
    162162
    163163    return;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp

    r21211 r24320  
    4242    Info.result = VERR_WRONG_ORDER;
    4343    Info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
    44     memset(&Info.Loc.u, 0, sizeof(Info.Loc.u));
     44    RT_ZERO(Info.Loc.u);
    4545    strcpy(Info.Loc.u.host.achName, "VBoxSharedClipboard");
    4646    Info.u32ClientID = UINT32_MAX;  /* try make valgrid shut up. */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp

    r21211 r24320  
    147147    struct sigaction OldSigAct;
    148148    struct sigaction SigAct;
    149     memset(&SigAct, 0, sizeof(SigAct));
     149    RT_ZERO(SigAct);
    150150    SigAct.sa_handler = SIG_IGN;
    151151    int rcSigAct = sigaction(SIGHUP, &SigAct, &OldSigAct);
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r22761 r24320  
    6969    Info.result = VERR_WRONG_ORDER;
    7070    Info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
    71     memset(&Info.Loc.u, 0, sizeof(Info.Loc.u));
     71    RT_ZERO(Info.Loc.u);
    7272    strcpy(Info.Loc.u.host.achName, "VBoxGuestPropSvc");
    7373    Info.u32ClientID = UINT32_MAX;  /* try make valgrid shut up. */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp

    r21219 r24320  
    4747    int rc = VINF_SUCCESS;
    4848
    49     memset(&vmmreqGuestCaps, 0, sizeof(vmmreqGuestCaps));
     49    RT_ZERO(vmmreqGuestCaps);
    5050    vmmdevInitRequest(&vmmreqGuestCaps.header, VMMDevReq_ReportGuestCapabilities);
    5151    vmmreqGuestCaps.caps = fState ? VMMDEV_GUEST_SUPPORTS_SEAMLESS : 0;
  • trunk/src/VBox/Additions/linux/sharedfolders/dirops.c

    r20342 r24320  
    4343        }
    4444
    45         memset(&params, 0, sizeof(params));
     45        RT_ZERO(params);
    4646
    4747        sf_d = sf_dir_info_alloc ();
     
    409409#endif
    410410
    411         memset(&params, 0, sizeof(params));
     411        RT_ZERO(params);
    412412        /* Ensure that the shared folders host service is using our fMode
    413413         * paramter */
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r24293 r24320  
    271271        }
    272272
    273         memset(&params, 0, sizeof(params));
     273        RT_ZERO(params);
    274274        params.Handle = SHFL_HANDLE_NIL;
    275275        /* We check the value of params.Handle afterwards to find out if
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r23621 r24320  
    169169        TRACE ();
    170170
    171         memset(&params, 0, sizeof(params));
     171        RT_ZERO(params);
    172172        params.CreateFlags = SHFL_CF_LOOKUP | SHFL_CF_ACT_FAIL_IF_NEW;
    173173        LogFunc(("calling vboxCallCreate, file %s, flags %#x\n",
     
    294294        err  = 0;
    295295
    296         memset(&params, 0, sizeof(params));
     296        RT_ZERO(params);
    297297
    298298        params.CreateFlags = SHFL_CF_ACT_OPEN_IF_EXISTS
     
    324324#define mode_set(r) ((iattr->ia_mode & (S_##r)) ? RTFS_UNIX_##r : 0)
    325325
    326             memset(&info, 0, sizeof(info));
     326            RT_ZERO(info);
    327327            if (iattr->ia_valid & ATTR_MODE)
    328328            {
     
    365365        if (iattr->ia_valid & ATTR_SIZE)
    366366        {
    367             memset(&info, 0, sizeof(info));
     367            RT_ZERO(info);
    368368            info.cbObject = iattr->ia_size;
    369369            cbBuffer = sizeof(info);
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r23551 r24320  
    8181        }
    8282
    83         memset(sf_g, 0, sizeof(*sf_g));
     83        RT_ZERO(*sf_g);
    8484
    8585        if (   info->nullchar     != '\0'
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