Changeset 73995 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Aug 31, 2018 10:39:08 AM (6 years ago)
- Location:
- trunk/src/VBox/Runtime/common/rest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp
r73978 r73995 179 179 RTJsonIteratorFree(hIterator); 180 180 } 181 else if (rcRet == VERR_JSON_IS_EMPTY) 181 else if ( rcRet == VERR_JSON_IS_EMPTY 182 || ( rcRet == VERR_JSON_VALUE_INVALID_TYPE 183 && RTJsonValueGetType(a_rCursor.m_hValue) == RTJSONVALTYPE_NULL) ) 182 184 rcRet = VINF_SUCCESS; 183 185 else 184 rcRet = a_rCursor.m_pPrimary->addError(a_rCursor, rcRet, "RTJsonIteratorBeginArray failed: %Rrc", rcRet); 186 rcRet = a_rCursor.m_pPrimary->addError(a_rCursor, rcRet, 187 "RTJsonIteratorBeginrray failed: %Rrc (type %s)", 188 rcRet, RTJsonValueTypeName(RTJsonValueGetType(a_rCursor.m_hValue))); 185 189 return rcRet; 186 190 … … 272 276 { 273 277 m_papElements = (RTCRestObjectBase **)pvNew; 274 memset( m_papElements, 0, (a_cEnsureCapacity - m_cCapacity) * sizeof(sizeof(m_papElements[0])));278 memset(&m_papElements[m_cCapacity], 0, (a_cEnsureCapacity - m_cCapacity) * sizeof(sizeof(m_papElements[0]))); 275 279 m_cCapacity = a_cEnsureCapacity; 276 280 } … … 295 299 for (size_t i = 0; i < a_rThat.m_cElements; i++) 296 300 { 301 AssertPtr(a_rThat.m_papElements[i]); 297 302 rc = insertCopyWorker(i, *a_rThat.m_papElements[i], false); 298 303 if (RT_SUCCESS(rc)) … … 337 342 m_papElements[a_idx] = a_pValue; 338 343 m_cElements++; 344 #ifdef RT_STRICT 345 for (size_t i = 0; i < m_cElements; i++) 346 AssertPtr(m_papElements[i]); 347 #endif 339 348 return VINF_SUCCESS; 340 349 } -
trunk/src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp
r73977 r73995 65 65 , m_strContentType(a_rThat.m_strContentType) 66 66 { 67 if ( m_pErrInfo)68 copyErrInfo( m_pErrInfo);67 if (a_rThat.m_pErrInfo) 68 copyErrInfo(a_rThat.m_pErrInfo); 69 69 } 70 70 -
trunk/src/VBox/Runtime/common/rest/RTCRestStringMapBase.cpp
r73978 r73995 175 175 RTJsonIteratorFree(hIterator); 176 176 } 177 else if (rcRet == VERR_JSON_IS_EMPTY) 177 else if ( rcRet == VERR_JSON_IS_EMPTY 178 || ( rcRet == VERR_JSON_VALUE_INVALID_TYPE 179 && RTJsonValueGetType(a_rCursor.m_hValue) == RTJSONVALTYPE_NULL) ) 178 180 rcRet = VINF_SUCCESS; 179 181 else 180 rcRet = a_rCursor.m_pPrimary->addError(a_rCursor, rcRet, "RTJsonIteratorBegin failed: %Rrc", rcRet); 182 rcRet = a_rCursor.m_pPrimary->addError(a_rCursor, rcRet, "RTJsonIteratorBegin failed: %Rrc (type %s)", 183 rcRet, RTJsonValueTypeName(RTJsonValueGetType(a_rCursor.m_hValue))); 181 184 return rcRet; 182 185 }
Note:
See TracChangeset
for help on using the changeset viewer.