/base/hiviewdfx/hiview/base/event_raw/decoded/ |
H A D | raw_data_decoder.cpp | 23 bool RawDataDecoder::FloatingNumberDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, double& dest) in FloatingNumberDecoded() argument 25 if (rawData == nullptr || pos >= maxLen) { in FloatingNumberDecoded() 29 if (!UnsignedVarintDecoded(rawData, maxLen, pos, valByteCnt)) { in FloatingNumberDecoded() 32 if ((pos + valByteCnt) > maxLen) { in FloatingNumberDecoded() 37 if (memcpy_s(reinterpret_cast<uint8_t*>(&tmpf), valByteCnt, rawData + pos, valByteCnt) != EOK) { in FloatingNumberDecoded() 43 if (memcpy_s(reinterpret_cast<uint8_t*>(&tmpd), valByteCnt, rawData + pos, valByteCnt) != EOK) { in FloatingNumberDecoded() 50 pos += valByteCnt; in FloatingNumberDecoded() 54 bool RawDataDecoder::SignedVarintDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, int64_t& dest) in SignedVarintDecoded() argument 56 if (rawData == nullptr || pos >= maxLen) { in SignedVarintDecoded() 60 if (!UnsignedVarintDecoded(rawData, maxLen, pos, uva in SignedVarintDecoded() 68 StringValueDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, std::string& dest) StringValueDecoded() argument 87 UnsignedVarintDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, uint64_t& dest) UnsignedVarintDecoded() argument 110 ValueTypeDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, struct ParamValueType& dest) ValueTypeDecoded() argument [all...] |
/base/tee/tee_client/frameworks/include/ |
H A D | tee_client_list.h | 19 #define CONTAINER_OF(pos, type, member) (type *)(((char *)(pos)) - OFFSET_OF(type, member)) 82 #define LIST_FOR_EACH(pos, list) \ 83 for ((pos) = (list)->next; (pos) != (list); (pos) = (pos)->next) 85 #define LIST_FOR_EACH_SAFE(pos, n, list) \ 86 for ((pos) = (list)->next, (n) = (pos) [all...] |
/base/request/request/test/unittest/cpp_test/fwkTest/src/ |
H A D | response_message_receiver_test.cpp | 398 int pos = 0; in HWTEST_F() local 403 pos += sizeof(magicNum); in HWTEST_F() 406 memcpy_s(except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cast<void *>(&msgId), sizeof(msgId)), in HWTEST_F() 408 pos += sizeof(msgId); in HWTEST_F() 410 EXPECT_EQ(memcpy_s(except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cast<void *>(&msgType), in HWTEST_F() 413 pos += sizeof(msgType); in HWTEST_F() 415 EXPECT_EQ(memcpy_s(except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cas in HWTEST_F() 460 int pos = 0; HWTEST_F() local 513 int pos = 0; HWTEST_F() local 558 int pos = 0; HWTEST_F() local 706 int pos = 0; HWTEST_F() local [all...] |
/base/account/os_account/frameworks/common/log/src/ |
H A D | account_log_wrapper.cpp | 30 auto pos = file.find_last_of("/"); in GetBriefFileName() local 31 if (pos != std::string::npos) { in GetBriefFileName() 32 return file.substr(pos + 1); in GetBriefFileName() 35 pos = file.find_last_of("\\"); in GetBriefFileName() 36 if (pos != std::string::npos) { in GetBriefFileName() 37 return file.substr(pos + 1); in GetBriefFileName()
|
/base/telephony/telephony_data/common/src/ |
H A D | data_storage_log_wrapper.cpp | 36 auto pos = file.find_last_of("/"); in GetBriefFileName() local 37 if (pos != std::string::npos) { in GetBriefFileName() 38 return file.substr(pos + 1); in GetBriefFileName() 41 pos = file.find_last_of("\\"); in GetBriefFileName() 42 if (pos != std::string::npos) { in GetBriefFileName() 43 return file.substr(pos + 1); in GetBriefFileName()
|
/base/account/os_account/services/accountmgr/test/unittest/common/account_mgr_service_test/ |
H A D | account_dump_helper_test.cpp | 131 auto pos = out.find("Account Manager service, enter '-h' for usage", 0); in HWTEST_F() local 132 EXPECT_NE(std::string::npos, pos); in HWTEST_F() 162 auto pos = out.find("OhosAccount name", 0); in HWTEST_F() local 163 EXPECT_NE(std::string::npos, pos); in HWTEST_F() 164 pos = out.find("OhosAccount uid", 0); in HWTEST_F() 165 EXPECT_NE(std::string::npos, pos); in HWTEST_F() 166 pos = out.find("OhosAccount status", 0); in HWTEST_F() 167 EXPECT_NE(std::string::npos, pos); in HWTEST_F() 168 pos = out.find("OhosAccount bind time", 0); in HWTEST_F() 169 EXPECT_NE(std::string::npos, pos); in HWTEST_F() 190 auto pos = out.find("ID:", 0); HWTEST_F() local 228 auto pos = out.find("Usage:dump", 0); HWTEST_F() local 246 auto pos = out.find("System error", 0); HWTEST_F() local 264 auto pos = out.find("System error", 0); HWTEST_F() local 283 auto pos = out.find("Invalid logLevel", 0); HWTEST_F() local 318 auto pos = out.find("Set logLevel success", 0); HWTEST_F() local 342 auto pos = out.find("Usage:dump", 0); HWTEST_F() local 361 auto pos = out.find("Usage:dump", 0); HWTEST_F() local 442 auto pos = out.find("Cannot query os account list", 0); HWTEST_F() local 471 auto pos = out.find("System error:", 0); HWTEST_F() local [all...] |
/base/update/updater/services/flashd/daemon/ |
H A D | flashd_utils.cpp | 25 auto pos = path.find_first_of('/', 1); in GetPathRoot() local 26 return path.substr(0, pos); in GetPathRoot() 31 auto pos = path.find_last_of('/'); in GetFileName() local 32 if (pos == std::string::npos) { in GetFileName() 33 pos = path.find_last_of('\\'); in GetFileName() 34 if (pos == std::string::npos) { in GetFileName() 38 return path.substr(pos + 1); in GetFileName()
|
/base/hiviewdfx/hiview/base/event_raw/include/decoded/ |
H A D | decoded_param.h | 31 DecodedParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) in DecodedParam() argument 32 : rawData_(rawData), maxLen_(maxLen), pos_(pos), key_(key) in DecodedParam() 64 UnsignedVarintDecodedParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) in UnsignedVarintDecodedParam() argument 65 : DecodedParam(rawData, maxLen, pos, key) {} in UnsignedVarintDecodedParam() 77 UnsignedVarintDecodedArrayParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) in UnsignedVarintDecodedArrayParam() argument 78 : DecodedParam(rawData, maxLen, pos, key) {} in UnsignedVarintDecodedArrayParam() 90 SignedVarintDecodedParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) in SignedVarintDecodedParam() argument 91 : DecodedParam(rawData, maxLen, pos, key) {} in SignedVarintDecodedParam() 103 SignedVarintDecodedArrayParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) in SignedVarintDecodedArrayParam() argument 104 : DecodedParam(rawData, maxLen, pos, ke in SignedVarintDecodedArrayParam() 116 FloatingNumberDecodedParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) FloatingNumberDecodedParam() argument 129 FloatingNumberDecodedArrayParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) FloatingNumberDecodedArrayParam() argument 142 StringDecodedParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) StringDecodedParam() argument 155 StringDecodedArrayParam(uint8_t* rawData, const size_t maxLen, size_t& pos, const std::string& key) StringDecodedArrayParam() argument [all...] |
H A D | raw_data_decoder.h | 26 static bool FloatingNumberDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, double& dest); 27 static bool SignedVarintDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, int64_t& dest); 28 static bool StringValueDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, std::string& dest); 29 static bool UnsignedVarintDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, uint64_t& dest); 30 static bool ValueTypeDecoded(uint8_t* rawData, const size_t maxLen, size_t& pos, struct ParamValueType& dest);
|
/base/notification/distributed_notification_service/services/ans/src/notification_smart_reminder/ |
H A D | string_utils.cpp | 28 size_t pos = strs.find(splitFlag); in Split() local 29 while (pos != strs.npos) { in Split() 30 std::string temp = strs.substr(0, pos); in Split() 32 strs = strs.substr(pos + 1, strs.size()); in Split() 33 pos = strs.find(splitFlag); in Split()
|
/base/request/request/test/fuzztest/downloaduploadmanager_fuzzer/ |
H A D | downloaduploadmanager_fuzzer.cpp | 631 int pos = 0; in ResponseMessageFuzzTestMsgHeaderParcel() local 638 pos += sizeof(magicNum); in ResponseMessageFuzzTestMsgHeaderParcel() 640 ret = memcpy_s(except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cast<void *>(&msgId), sizeof(msgId)); in ResponseMessageFuzzTestMsgHeaderParcel() 644 pos += sizeof(msgId); in ResponseMessageFuzzTestMsgHeaderParcel() 647 except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cast<void *>(&msgType), sizeof(msgType)); in ResponseMessageFuzzTestMsgHeaderParcel() 651 pos += sizeof(msgType); in ResponseMessageFuzzTestMsgHeaderParcel() 654 except + pos, static_cast<size_t>(arraySize - pos), reinterpret_cas in ResponseMessageFuzzTestMsgHeaderParcel() 693 int pos = 0; ResponseMessageFuzzTestResponseFromParcel() local 746 int pos = 0; ResponseMessageFuzzTestTaskStatesFromParcel() local 793 int pos = 0; ResponseMessageFuzzTestNotifyDataFromParcel() local [all...] |
/base/hiviewdfx/hilog/interfaces/js/kits/napi/src/hilog/src/ |
H A D | hilog_napi_base.cpp | 50 uint32_t pos = 0;
in ParseLogContent() local 57 for (; pos < len; ++pos) {
in ParseLogContent() 62 if (formatStr[pos] != '%') {
in ParseLogContent() 63 ret += formatStr[pos];
in ParseLogContent() 67 if (((pos + PUBLIC_LEN + PROPERTY_POS) < len) &&
in ParseLogContent() 68 formatStr.substr(pos + PROPERTY_POS, PUBLIC_LEN) == "public") {
in ParseLogContent() 69 pos += (PUBLIC_LEN + PROPERTY_POS);
in ParseLogContent() 71 } else if (((pos + PRIVATE_LEN + PROPERTY_POS) < len) &&
in ParseLogContent() 72 formatStr.substr(pos in ParseLogContent() [all...] |
/base/hiviewdfx/hiview/base/utility/ |
H A D | string_util.cpp | 69 string::size_type pos = 0; in ReplaceStr() local 71 while ((pos = strTmp.find(src, pos)) != string::npos) { in ReplaceStr() 72 strTmp.replace(pos, src.length(), dst); in ReplaceStr() 73 pos += dst.length(); in ReplaceStr() 94 string::size_type pos = strTmp.find(sep); in SplitStr() local 95 if (string::npos == pos || sep.empty()) { in SplitStr() 102 strPart = needTrim ? TrimStr(strTmp.substr(0, pos)) : strTmp.substr(0, pos); in SplitStr() 106 strTmp = strTmp.substr(sep.size() + pos, strTm in SplitStr() 228 size_t pos = input.find(split, 0); GetLeftSubstr() local 237 size_t pos = input.find(split, 0); GetRightSubstr() local 246 size_t pos = input.rfind(split, string::npos); GetRleftSubstr() local 255 size_t pos = input.rfind(split, string::npos); GetRrightSubstr() local 264 size_t pos = 0; EraseString() local [all...] |
/base/hiviewdfx/hidumper/frameworks/native/src/executor/ |
H A D | file_format_dump_filter.cpp | 73 for (size_t pos = 0; pos < sum; pos++) { in FilterControlChar() 74 char &c = str.at(pos); in FilterControlChar() 76 if ((!skip) && (c == ASCII_ESC) && ((pos + 1) < sum)) { in FilterControlChar() 77 char &next_c = str.at(pos + 1); in FilterControlChar()
|
/base/customization/enterprise_device_management/test/fuzztest/enterprisedevicemgrability_fuzzer/ |
H A D | enterprise_device_mgr_ability_fuzzer.cpp | 42 int32_t pos = 0; in getCommonEventData() local 46 int32_t code = CommonFuzzer::GetU32Data(data, pos, size); in getCommonEventData() 47 int uid = CommonFuzzer::GetU32Data(data, pos, size); in getCommonEventData() 48 long checkTime = CommonFuzzer::GetLong(data, pos, size); in getCommonEventData() 49 int32_t stringSize = (size - pos) / 5; in getCommonEventData() 50 admin.SetBundleName(CommonFuzzer::GetString(data, pos, stringSize, size)); in getCommonEventData() 51 admin.SetAbilityName(CommonFuzzer::GetString(data, pos, stringSize, size)); in getCommonEventData() 53 want.SetParam(FIRMWARE_EVENT_INFO_NAME, CommonFuzzer::GetString(data, pos, stringSize, size)); in getCommonEventData() 54 want.SetParam(FIRMWARE_EVENT_INFO_TYPE, CommonFuzzer::GetString(data, pos, stringSize, size)); in getCommonEventData() 57 want.SetAction(CommonFuzzer::GetString(data, pos, stringSiz in getCommonEventData() [all...] |
/base/startup/init/services/param/base/ |
H A D | param_comm.c | 138 char *pos = value + strlen(value);
in SplitParamString() local 139 pos--;
in SplitParamString() 140 while (isspace(*pos) && pos > value) {
in SplitParamString() 141 (*pos) = '\0';
in SplitParamString() 142 pos--;
in SplitParamString() 146 if ((*value == '"') && (pos > value) && (*pos == '"')) {
in SplitParamString() 148 *pos = '\0';
in SplitParamString()
|
/base/customization/enterprise_device_management/test/fuzztest/addosaccountplugin_fuzzer/ |
H A D | add_os_account_plugin_fuzzer.cpp | 42 int32_t pos = 0; in LLVMFuzzerTestOneInput() local 49 admin.SetBundleName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 50 admin.SetAbilityName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 55 std::vector<std::string> key {CommonFuzzer::GetString(data, pos, stringSize, size)}; in LLVMFuzzerTestOneInput() 56 std::vector<std::string> value {CommonFuzzer::GetString(data, pos, stringSize, size)}; in LLVMFuzzerTestOneInput()
|
/base/hiviewdfx/hilog_lite/frameworks/js/builtin/src/ |
H A D | hilog_module.cpp | 56 size_t pos = 0;
in ParseLogContent() local 59 for (; pos < len; ++pos) {
in ParseLogContent() 64 if (format[pos] != '%') {
in ParseLogContent() 65 HilogString::Putc(format[pos], logContent);
in ParseLogContent() 69 if (((pos + PUBLIC_LEN + PROPERTY_POS) < len) &&
in ParseLogContent() 70 (strncmp(format + pos + PROPERTY_POS, "public", PUBLIC_LEN) == 0)) {
in ParseLogContent() 71 pos += (PUBLIC_LEN + PROPERTY_POS);
in ParseLogContent() 73 } else if (((pos + PRIVATE_LEN + PROPERTY_POS) < len) &&
in ParseLogContent() 74 (strncmp(format + pos in ParseLogContent() [all...] |
/base/update/updateservice/foundations/ability/log/src/ |
H A D | update_log.cpp | 45 auto pos = file.find_last_of("/"); in GetBriefFileName() local 46 if (pos != std::string::npos) { in GetBriefFileName() 47 return file.substr(pos + 1); in GetBriefFileName() 49 pos = file.find_last_of("\\"); in GetBriefFileName() 50 if (pos != std::string::npos) { in GetBriefFileName() 51 return file.substr(pos + 1); in GetBriefFileName() 130 for (size_t pos = 0; (pos = str.find(subStr, pos)) != std::string::npos; pos in FindSubStrCount() [all...] |
/base/customization/enterprise_device_management/test/fuzztest/usercertplugin_fuzzer/ |
H A D | user_cert_plugin_fuzzer.cpp | 42 int32_t pos = 0; in LLVMFuzzerTestOneInput() local 43 int32_t stringSize = (size - pos) / 9; in LLVMFuzzerTestOneInput() 50 admin.SetBundleName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 51 admin.SetAbilityName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 59 parcel.WriteString(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 62 parcel.WriteString(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput()
|
/base/customization/enterprise_device_management/test/fuzztest/setbrowserpoliciesplugin_fuzzer/ |
H A D | set_browser_policies_plugin_fuzzer.cpp | 43 int32_t pos = 0; in SetParcelContent() local 45 std::string appId(CommonFuzzer::GetString(data, pos, stringSize, size)); in SetParcelContent() 46 std::string policies(CommonFuzzer::GetString(data, pos, stringSize, size)); in SetParcelContent() 56 std::string policyName(CommonFuzzer::GetString(data, pos, stringSize, size)); in SetParcelContent() 86 int32_t pos = 0; in LLVMFuzzerTestOneInput() local 87 int32_t stringSize = (size - pos) / 6; in LLVMFuzzerTestOneInput() 94 admin.SetBundleName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput() 95 admin.SetAbilityName(CommonFuzzer::GetString(data, pos, stringSize, size)); in LLVMFuzzerTestOneInput()
|
/base/web/webview/test/fuzztest/ohos_nweb/nwebhelper_fuzzer/ |
H A D | nweb_create_window.cpp | 63 uint32_t pos = 0; in GetWebEngineArgs() local 64 while (pos < webEngineArgValue.size()) { in GetWebEngineArgs() 65 if (webEngineArgValue[pos] == ',') { in GetWebEngineArgs() 66 webEngineArgList.emplace_back(webEngineArgValue.substr(start, pos - start)); in GetWebEngineArgs() 67 pos++; in GetWebEngineArgs() 68 start = pos; in GetWebEngineArgs() 70 pos++; in GetWebEngineArgs() 73 webEngineArgList.emplace_back(webEngineArgValue.substr(start, pos - start)); in GetWebEngineArgs()
|
/base/web/webview/test/unittest/common/ |
H A D | nweb_create_window.cpp | 62 uint32_t pos = 0; in GetWebEngineArgs() local 63 while (pos < webEngineArgValue.size()) { in GetWebEngineArgs() 64 if (webEngineArgValue[pos] == ',') { in GetWebEngineArgs() 65 webEngineArgList.emplace_back(webEngineArgValue.substr(start, pos - start)); in GetWebEngineArgs() 66 pos++; in GetWebEngineArgs() 67 start = pos; in GetWebEngineArgs() 69 pos++; in GetWebEngineArgs() 72 webEngineArgList.emplace_back(webEngineArgValue.substr(start, pos - start)); in GetWebEngineArgs()
|
/base/update/updater/services/applypatch/ |
H A D | command_process.cpp | 103 bool LoadTarget(const Command ¶ms, size_t &pos, std::vector<uint8_t> &buffer,
in LoadTarget() argument 108 std::string srcHash = params.GetArgumentByPos(pos++);
in LoadTarget() 111 tgtHash = params.GetArgumentByPos(pos++);
in LoadTarget() 115 std::string cmdTmp = params.GetArgumentByPos(pos++);
in LoadTarget() 131 std::string blockLen = params.GetArgumentByPos(pos++);
in LoadTarget() 134 if (targetBlock.LoadTargetBuffer(params, buffer, srcBlockSize, pos, srcHash) != 0) {
in LoadTarget() 153 size_t pos = H_DIFF_CMD_ARGS_START;
in Execute() local 155 pos = H_MOVE_CMD_ARGS_START;
in Execute() 161 if (!LoadTarget(params, pos, buffer, targetBlock, result)) {
in Execute() 170 pos in Execute() 206 size_t pos = 1; Execute() local [all...] |
/base/print/print_fwk/frameworks/models/print_models/src/ |
H A D | print_utils.cpp | 54 auto pos = globalId.find(GLOBAL_ID_DELIMITER); in GetExtensionId() local 55 if (pos == std::string::npos) { in GetExtensionId() 58 return globalId.substr(0, pos); in GetExtensionId() 68 auto pos = globalId.find(GLOBAL_ID_DELIMITER); in GetLocalId() local 69 if (pos == std::string::npos) { in GetLocalId() 73 if (globalId.substr(0, pos) != extensionId) { in GetLocalId() 76 return globalId.substr(pos + 1); in GetLocalId() 86 auto pos = cid.find(EXTENSION_CID_DELIMITER); in DecodeExtensionCid() local 87 if (pos == std::string::npos) { in DecodeExtensionCid() 90 extensionId = cid.substr(0, pos); in DecodeExtensionCid() 110 auto pos = type.find(TASK_EVENT_DELIMITER); GetEventType() local [all...] |