Changeset 97890 in vbox
- Timestamp:
- Dec 29, 2022 2:58:32 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
r97889 r97890 62 62 Assert(value >= 0 && value <= 0xffff); 63 63 64 rstrOut = Utf8StrFmt("%04RX16", (uint16_t)value);64 rstrOut.printf("%04RX16", (uint16_t)value); 65 65 } 66 66 else if (USBFilterIsMethodString(matchingMethod)) … … 130 130 else 131 131 { 132 aErrStr = Utf8StrFmt(tr("The %s value '%s' is too big (max 0xFFFF)"), 133 i_describeUSBFilterIdx(aIdx), pcszValue); 132 aErrStr.printf(tr("The %s value '%s' is too big (max 0xFFFF)"), i_describeUSBFilterIdx(aIdx), pcszValue); 134 133 return E_INVALIDARG; 135 134 } … … 145 144 /* Any wildcard in the string? */ 146 145 Assert(USBFilterIsStringField(aIdx)); 147 if ( 148 || 146 if ( strchr(pcszValue, '*') 147 || strchr(pcszValue, '?') 149 148 /* || strchr (psz, '[') - later */ 150 149 ) … … 159 158 if (vrc == VERR_INVALID_PARAMETER) 160 159 { 161 aErrStr = Utf8StrFmt(tr("The %s filter expression '%s' is not valid"), i_describeUSBFilterIdx(aIdx), aValue.c_str());160 aErrStr.printf(tr("The %s filter expression '%s' is not valid"), i_describeUSBFilterIdx(aIdx), aValue.c_str()); 162 161 return E_INVALIDARG; 163 162 } 164 163 if (vrc == VERR_BUFFER_OVERFLOW) 165 164 { 166 aErrStr = Utf8StrFmt(tr("Insufficient expression space for the '%s' filter expression '%s'"),167 165 aErrStr.printf(tr("Insufficient expression space for the '%s' filter expression '%s'"), 166 i_describeUSBFilterIdx(aIdx), aValue.c_str()); 168 167 return E_FAIL; 169 168 } 170 169 AssertRC(vrc); 171 aErrStr = Utf8StrFmt(tr("Encountered unexpected status %Rrc when setting '%s' to '%s'"),172 170 aErrStr.printf(tr("Encountered unexpected status %Rrc when setting '%s' to '%s'"), 171 vrc, i_describeUSBFilterIdx(aIdx), aValue.c_str()); 173 172 return E_FAIL; 174 173 } … … 458 457 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 459 458 460 aName = bd->mData.strName; 461 462 return S_OK; 459 return aName.assignEx(bd->mData.strName); 463 460 } 464 461
Note:
See TracChangeset
for help on using the changeset viewer.