Changeset 769 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 8, 2007 10:31:15 AM (18 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
r719 r769 91 91 struct VBGLHGCMHANDLEDATA *p; 92 92 int rc = vbglHandleHeapEnter (); 93 uint32_t i; 93 94 94 95 if (VBOX_FAILURE (rc)) 95 {96 96 return NULL; 97 }98 97 99 98 p = NULL; … … 102 101 * @todo bitmap for faster search and other obvious optimizations. 103 102 */ 104 105 uint32_t i;106 103 107 104 for (i = 0; i < ELEMENTS(g_vbgldata.aHGCMHandleData); i++) … … 110 107 { 111 108 p = &g_vbgldata.aHGCMHandleData[i]; 112 113 109 p->fAllocated = 1; 114 115 110 break; 116 111 } … … 130 125 131 126 if (!pHandle) 132 {133 127 return; 134 }135 128 136 129 rc = vbglHandleHeapEnter (); 137 130 138 131 if (VBOX_FAILURE (rc)) 139 {140 132 return; 141 }142 133 143 134 VBGL_HGCM_ASSERTMsg(pHandle->fAllocated, … … 145 136 146 137 memset(pHandle, 0, sizeof (struct VBGLHGCMHANDLEDATA)); 147 148 138 vbglHandleHeapLeave (); 149 150 139 return; 151 140 } … … 157 146 158 147 if (!pHandle || !pData) 159 {160 148 return VERR_INVALID_PARAMETER; 161 }162 149 163 150 pHandleData = vbglHGCMHandleAlloc (); -
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
r719 r769 55 55 { 56 56 VMMDevHGCMConnect *pHGCMConnect; 57 int rc; 58 57 59 if (!pConnectInfo || !pAsyncCallback) 58 60 { … … 63 65 64 66 /* Allocate request */ 65 intrc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMConnect, sizeof (VMMDevHGCMConnect), VMMDevReq_HGCMConnect);67 rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMConnect, sizeof (VMMDevHGCMConnect), VMMDevReq_HGCMConnect); 66 68 67 69 if (VBOX_SUCCESS(rc)) … … 104 106 { 105 107 VMMDevHGCMDisconnect *pHGCMDisconnect; 108 int rc; 109 106 110 if (!pDisconnectInfo || !pAsyncCallback) 107 111 { … … 112 116 113 117 /* Allocate request */ 114 intrc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect);118 rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect); 115 119 116 120 if (VBOX_SUCCESS(rc)) … … 147 151 { 148 152 VMMDevHGCMCall *pHGCMCall; 153 uint32_t cbParms; 154 int rc; 155 149 156 if (!pCallInfo || !pAsyncCallback) 150 157 { … … 156 163 pHGCMCall = NULL; 157 164 158 uint32_tcbParms = pCallInfo->cParms * sizeof (HGCMFunctionParameter);165 cbParms = pCallInfo->cParms * sizeof (HGCMFunctionParameter); 159 166 160 167 /* Allocate request */ 161 intrc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMCall, sizeof (VMMDevHGCMCall) + cbParms, VMMDevReq_HGCMCall);168 rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMCall, sizeof (VMMDevHGCMCall) + cbParms, VMMDevReq_HGCMCall); 162 169 163 170 dprintf (("VbglHGCMCall Allocated gr %p, rc = %Vrc, cbParms = %d\n", pHGCMCall, rc, cbParms)); -
trunk/src/VBox/Additions/common/VBoxGuestLib/Init.cpp
r1 r769 86 86 int VbglEnter (void) 87 87 { 88 int rc; 89 88 90 #ifndef VBGL_VBOXGUEST 89 91 if (g_vbgldata.status == VbglStatusInitializing) … … 93 95 #endif 94 96 95 intrc = g_vbgldata.status != VbglStatusNotInitialized? VINF_SUCCESS: VERR_VBGL_NOT_INITIALIZED;97 rc = g_vbgldata.status != VbglStatusNotInitialized? VINF_SUCCESS: VERR_VBGL_NOT_INITIALIZED; 96 98 97 99 // dprintf(("VbglEnter: rc = %d\n", rc)); -
trunk/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp
r719 r769 387 387 DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize) 388 388 { 389 VBGLPHYSHEAPBLOCK *pBlock ;389 VBGLPHYSHEAPBLOCK *pBlock, *iter; 390 390 int rc = vbglPhysHeapEnter (); 391 391 … … 400 400 401 401 /* If there are free blocks in the heap, look at them. */ 402 VBGLPHYSHEAPBLOCK *iter = g_vbgldata.pFreeBlocksHead;402 iter = g_vbgldata.pFreeBlocksHead; 403 403 404 404 /* There will be not many blocks in the heap, so
Note:
See TracChangeset
for help on using the changeset viewer.