| /base/security/huks/utils/list/ |
| D | hks_double_list.c | 22 void InitializeDoubleList(struct DoubleList *node) in InitializeDoubleList() argument 24 if (node == NULL) { in InitializeDoubleList() 28 node->prev = node; in InitializeDoubleList() 29 node->next = node; in InitializeDoubleList() 32 void AddNodeAfterDoubleListHead(struct DoubleList *head, struct DoubleList *node) in AddNodeAfterDoubleListHead() argument 34 if ((head == NULL) || (node == NULL)) { in AddNodeAfterDoubleListHead() 42 head->next->prev = node; in AddNodeAfterDoubleListHead() 43 node->next = head->next; in AddNodeAfterDoubleListHead() 44 node->prev = head; in AddNodeAfterDoubleListHead() 45 head->next = node; in AddNodeAfterDoubleListHead() [all …]
|
| /base/update/updater/test/fuzztest/updaterutils_fuzzer/ |
| D | updater_utils_fuzzer.cpp | 139 JsonNode node(str); in TestJsonNodeValueKey() local 140 node.Key(); in TestJsonNodeValueKey() 141 node["key"].Key(); in TestJsonNodeValueKey() 145 JsonNode node(str); in TestJsonNodeValueKey() local 146 node.Key(); in TestJsonNodeValueKey() 153 JsonNode node(str); in TestJsonNodeKey() local 154 node["key"]; in TestJsonNodeKey() 160 JsonNode node(str); in TestJsonNodeValueTypeStr() local 161 node["key"].Type(); in TestJsonNodeValueTypeStr() 162 node["key"]; in TestJsonNodeValueTypeStr() [all …]
|
| /base/update/updater/test/unittest/utils/json/ |
| D | utils_json_test.cpp | 57 JsonNode node(str); 58 EXPECT_EQ(node.Key(), std::nullopt); 59 EXPECT_EQ(node["key"].Key(), "key"); 63 JsonNode node(str); 64 EXPECT_EQ(node.Key(), std::nullopt); 71 JsonNode node(str); 72 EXPECT_EQ((node["key"] == 1), false); 78 JsonNode node(str); 79 EXPECT_EQ(node["key"].Type(), NodeType::STRING); 80 EXPECT_EQ(node["key"], "value1"); [all …]
|
| D | utils_json_visitor_test.cpp | 95 JsonNode node {newJsonStr}; in TestInvalidCases() local 96 EXPECT_EQ(false, Visit<SETVAL>(node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases() 97 EXPECT_EQ(false, Visit<SETVAL>({}, node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases() 103 JsonNode node {newJsonStr}; in TestInvalidCases() local 104 EXPECT_EQ(false, Visit<SETVAL>(node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases() 105 EXPECT_EQ(false, Visit<SETVAL>({}, node[Traits<T>::STRUCT_KEY], obj)) << data.first; in TestInvalidCases() 145 JsonNode node {dJson}; variable 147 EXPECT_EQ(Visit<SETVAL>(node["D"], d), true); 172 JsonNode node {eJson}; variable 173 EXPECT_EQ(Visit<SETVAL>(node["E"], e), true); [all …]
|
| /base/useriam/user_auth_framework/test/fuzztest/services/servicecore_fuzzer/src/ |
| D | schedule_node_fuzzer.cpp | 59 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetScheduleId() local 60 if (node != nullptr) { in FuzzScheduleNodeGetScheduleId() 61 node->GetScheduleId(); in FuzzScheduleNodeGetScheduleId() 69 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetContextId() local 70 if (node != nullptr) { in FuzzScheduleNodeGetContextId() 71 node->GetContextId(); in FuzzScheduleNodeGetContextId() 79 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetAuthType() local 80 if (node != nullptr) { in FuzzScheduleNodeGetAuthType() 81 node->GetAuthType(); in FuzzScheduleNodeGetAuthType() 89 auto node = GetScheduleNode(parcel); in FuzzScheduleNodeGetExecutorMatcher() local [all …]
|
| D | resource_node_fuzzer.cpp | 107 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetExecutorIndex() local 108 if (node != nullptr) { in FuzzResourceNodeGetExecutorIndex() 109 node->GetExecutorIndex(); in FuzzResourceNodeGetExecutorIndex() 117 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetOwnerDeviceId() local 118 if (node != nullptr) { in FuzzResourceNodeGetOwnerDeviceId() 119 node->GetOwnerDeviceId(); in FuzzResourceNodeGetOwnerDeviceId() 127 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetOwnerPid() local 128 if (node != nullptr) { in FuzzResourceNodeGetOwnerPid() 129 node->GetOwnerPid(); in FuzzResourceNodeGetOwnerPid() 137 auto node = GetResourceNode(parcel); in FuzzResourceNodeGetAuthType() local [all …]
|
| /base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
| D | cert_manager_session_mgr.c | 46 static void FreeSessionNode(struct CmSessionNode **node) in FreeSessionNode() argument 48 if ((node == NULL) || (*node == NULL)) { in FreeSessionNode() 52 CM_FREE_PTR((*node)->handle.data); in FreeSessionNode() 53 CM_FREE_PTR((*node)->info.uri.data); in FreeSessionNode() 54 CM_FREE_PTR(*node); in FreeSessionNode() 107 …atic int32_t ConstructSessionInfo(const struct CmSessionNodeInfo *info, struct CmSessionNode *node) in ConstructSessionInfo() argument 117 node->info.userId = info->userId; in ConstructSessionInfo() 118 node->info.uid = info->uid; in ConstructSessionInfo() 119 node->info.uri.data = data; in ConstructSessionInfo() 120 node->info.uri.size = size; in ConstructSessionInfo() [all …]
|
| /base/useriam/user_auth_framework/test/unittest/services/mocks/ |
| D | mock_resource_node.h | 49 auto node = std::make_shared<MockResourceNode>(); variable 50 EXPECT_CALL(*node, GetExecutorIndex()).WillRepeatedly(Return(executorId)); 51 EXPECT_CALL(*node, GetAuthType()).WillRepeatedly(Return(PIN)); 52 EXPECT_CALL(*node, GetExecutorRole()).WillRepeatedly(Return(COLLECTOR)); 53 EXPECT_CALL(*node, GetExecutorMatcher()).WillRepeatedly(Return(0)); 54 EXPECT_CALL(*node, GetExecutorSensorHint()).WillRepeatedly(Return(0)); 55 EXPECT_CALL(*node, Detach()).Times(detach ? 1 : 0); 56 return node; 63 auto node = std::make_shared<MockResourceNode>(); in CreateWithExecuteIndex() local 65 EXPECT_CALL(*node, GetExecutorIndex()).WillRepeatedly(Return(executorId)); in CreateWithExecuteIndex() [all …]
|
| /base/startup/init/services/utils/ |
| D | init_hashmap.c | 51 HashNode *node = (HashNode *)root; in GetHashNodeByNode() local 52 while (node != NULL) { in GetHashNodeByNode() 53 int ret = tab->nodeCompare(node, new); in GetHashNodeByNode() 55 return node; in GetHashNodeByNode() 57 node = node->next; in GetHashNodeByNode() 65 HashNode *node = (HashNode *)root; in GetHashNodeByKey() local 66 while (node != NULL) { in GetHashNodeByKey() 67 int ret = keyCompare(node, key); in GetHashNodeByKey() 69 return node; in GetHashNodeByKey() 71 node = node->next; in GetHashNodeByKey() [all …]
|
| /base/hiviewdfx/hiview/plugins/freeze_detector/ |
| D | rule_cluster.cpp | 91 for (xmlNode* node = root; node; node = node->next) { in ParseRuleFile() local 92 if (node->type != XML_ELEMENT_NODE) { in ParseRuleFile() 95 if (TAG_FREEZE == std::string((char*)(node->name))) { in ParseRuleFile() 96 ParseTagFreeze(node); in ParseRuleFile() 108 for (xmlNode* node = tag->children; node; node = node->next) { in ParseTagFreeze() local 109 if (TAG_RULES == std::string((char*)(node->name))) { in ParseTagFreeze() 110 ParseTagRules(node); in ParseTagFreeze() 117 for (xmlNode* node = tag->children; node; node = node->next) { in ParseTagRules() local 118 if (TAG_RULE == std::string((char*)(node->name))) { in ParseTagRules() 119 ParseTagRule(node); in ParseTagRules() [all …]
|
| /base/security/access_token/interfaces/innerkits/analysis_model/src/ |
| D | code_signature_analysis_kit.c | 31 AppRiskInfo *node = g_modelDataHead->next; in FindExistingNode() local 32 while (node != NULL) { in FindExistingNode() 33 if (node->tokenId == tokenId) { in FindExistingNode() 36 node = node->next; in FindExistingNode() 39 return node; in FindExistingNode() 42 static int32_t IsRiskStatusChanged(AppRiskInfo *node) in IsRiskStatusChanged() argument 46 RiskPolicyType policy = node->status.policy; in IsRiskStatusChanged() 49 TimeStampNode *tmp = ((node->errInfoList)[i]).timeStampChain; in IsRiskStatusChanged() 53 node->status.eventCount = eventCount; in IsRiskStatusChanged() 54 node->status.totalCount = totalCount; in IsRiskStatusChanged() [all …]
|
| /base/security/device_auth/test/unittest/deviceauth/source/ |
| D | device_auth_ext_mock.c | 41 ExtPluginNode *node = (ExtPluginNode *)HcMalloc(sizeof(ExtPluginNode), 0); in CreateNode() local 42 if (node == NULL) { in CreateNode() 46 node->plugin = (ExtPlugin *)HcMalloc(sizeof(ExtPlugin), 0); in CreateNode() 47 if (node->plugin == NULL) { in CreateNode() 49 HcFree(node); in CreateNode() 52 node->plugin->pluginType = plugType; in CreateNode() 53 node->plugin->init = InitPlugin; in CreateNode() 54 node->plugin->destroy = DestroyPlugin; in CreateNode() 55 node->next = NULL; in CreateNode() 56 return node; in CreateNode() [all …]
|
| /base/startup/init/interfaces/innerkits/include/ |
| D | list.h | 76 #define ListEmpty(node) ((node).next == &(node) && (node).prev == &(node)) argument 78 #define ForEachListEntry(list, node) for (node = (list)->next; node != (list); node = node->next) argument 118 typedef int (*ListCompareProc)(ListNode *node, ListNode *newNode); 141 typedef int (*ListTraversalProc)(ListNode *node, void *data); 180 typedef void (*ListDestroyProc)(ListNode *node);
|
| /base/startup/init/test/unittest/init/ |
| D | group_unittest.cpp | 32 HashNode node; member 38 TestHashNode *testNode1 = HASHMAP_ENTRY(node1, TestHashNode, node); in TestHashNodeCompare() 39 TestHashNode *testNode2 = HASHMAP_ENTRY(node2, TestHashNode, node); in TestHashNodeCompare() 45 TestHashNode *testNode1 = HASHMAP_ENTRY(node1, TestHashNode, node); in TestHashKeyCompare() 49 static int TestHashNodeFunction(const HashNode *node) in TestHashNodeFunction() argument 51 TestHashNode *testNode = HASHMAP_ENTRY(node, TestHashNode, node); in TestHashNodeFunction() 71 static void TestHashNodeFree(const HashNode *node, void *context) in TestHashNodeFree() argument 73 TestHashNode *testNode = HASHMAP_ENTRY(node, TestHashNode, node); in TestHashNodeFree() 80 …TestHashNode *node = reinterpret_cast<TestHashNode *>(malloc(sizeof(TestHashNode) + strlen(value) … in TestCreateHashNode() local 81 if (node == nullptr) { in TestCreateHashNode() [all …]
|
| /base/update/updater/services/ui/ |
| D | updater_ui_config.cpp | 70 std::string SelectConfig(const JsonNode &node) in SelectConfig() argument 73 for (const auto &iter : node) { in SelectConfig() 104 JsonNode node { Fs::path { UI_CFG_FILE }}; in Init() local 105 const JsonNode &cfgNode = node[UI_CFG_KEY]; in Init() 131 bool UpdaterUiConfig::Init(const JsonNode &node) in Init() argument 133 static bool res = [&node] () { in Init() 134 …return LoadLangRes(node) && LoadStrategy(node) && LoadCallbacks(node) && LoadFocusCfg(node) && Loa… in Init() 149 bool UpdaterUiConfig::LoadPages(const JsonNode &node) in LoadPages() argument 152 if (!Visit<SETVAL>(node, pagePath)) { in LoadPages() 174 bool UpdaterUiConfig::LoadLangRes(const JsonNode &node) in LoadLangRes() argument [all …]
|
| D | updater_ui_config.h | 32 static bool Init(const JsonNode &node); 33 static bool LoadStrategy(const JsonNode &node); 34 static bool LoadPages(const JsonNode &node); 35 static bool LoadLangRes(const JsonNode &node); 36 static bool LoadCallbacks(const JsonNode &node); 37 static bool LoadFocusCfg(const JsonNode &node);
|
| /base/startup/init/services/param/trigger/ |
| D | trigger_manager.c | 35 CommandNode *node = (CommandNode *)calloc(1, size); in AddCommand() local 36 PARAM_CHECK(node != NULL, return -1, "Failed to alloc memory for command"); in AddCommand() 37 node->cmdKeyIndex = cmdKeyIndex; in AddCommand() 38 node->next = NULL; in AddCommand() 39 node->content[0] = '\0'; in AddCommand() 41 int ret = memcpy_s(node->content, size, content, strlen(content)); in AddCommand() 42 node->content[strlen(content)] = '\0'; in AddCommand() 43 PARAM_CHECK(ret == EOK, free(node); in AddCommand() 46 node->cfgContext.type = INIT_CONTEXT_MAIN; in AddCommand() 48 node->cfgContext.type = cfgContext->type; in AddCommand() [all …]
|
| /base/startup/init/services/param/watcher/proxy/ |
| D | watcher_manager.cpp | 168 …TraversalNode([this, mananger, name, value](ParamWatcherListPtr list, WatcherNodePtr node, uint32_… in ProcessParameterChange() argument 169 auto remoteWatcher = mananger->GetRemoteWatcher(node->GetNodeId()); in ProcessParameterChange() 362 …remoteWatchers_->TraversalNodeSafe([this](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t … in OnStop() argument 363 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in OnStop() 387 [this, remoteWatcher](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t index) { in OnRemoteDied() argument 388 auto group = GetWatcherGroup(node->GetNodeId()); in OnRemoteDied() 405 WatcherNodePtr node = remoteWatchers_->GetNextNode(nullptr); in GetRemoteWatcher() local 406 while (node != nullptr) { in GetRemoteWatcher() 407 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in GetRemoteWatcher() 414 node = remoteWatchers_->GetNextNode(node); in GetRemoteWatcher() [all …]
|
| /base/security/selinux_adapter/interfaces/policycoreutils/src/ |
| D | selinux_map.c | 43 static int GroupNodeGetNodeHashCode(const HashNode *node) in GroupNodeGetNodeHashCode() argument 45 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeGetNodeHashCode() 49 static void GroupNodeFree(const HashNode *node) in GroupNodeFree() argument 51 ParamHashNode *groupNode = HASHMAP_ENTRY(node, ParamHashNode, hashNode); in GroupNodeFree() 93 int32_t HashMapAdd(HashTab *handle, HashNode *node) in HashMapAdd() argument 95 if (handle == NULL || !(node != NULL && node->next == NULL)) { in HashMapAdd() 98 int hashCode = GroupNodeGetNodeHashCode(node); in HashMapAdd() 103 HashNode *tmp = GetHashNodeByNode(handle->buckets[hashCode], node); in HashMapAdd() 107 node->next = handle->buckets[hashCode]; in HashMapAdd() 108 handle->buckets[hashCode] = node; in HashMapAdd() [all …]
|
| D | sehap_contexts_trie.cpp | 47 SehapContextsTrie* node = this; in FindChild() local 48 auto iter = node->children.find(element); in FindChild() 49 if (iter != node->children.end()) { in FindChild() 57 SehapContextsTrie* node = this; in Insert() local 63 if (node->children[word] == nullptr) { in Insert() 64 node->children[word] = new (std::nothrow) SehapContextsTrie(); in Insert() 65 if (node->children[word] == nullptr) { in Insert() 70 node = node->children[word]; in Insert() 73 node->prefixInfo.isEnd = true; in Insert() 74 node->prefixInfo.domain = domain; in Insert() [all …]
|
| /base/startup/init/services/init/standard/ |
| D | init_cmdexecutor.c | 54 OH_ListInit(&cmdExec->node); in AddCmdExecutor_() 57 OH_ListAddTail(&cmd->cmdExecutor, &cmdExec->node); in AddCmdExecutor_() 79 ListNode *node = cmd->cmdExecutor.next; in RemoveCmdExecutor() local 80 while (node != &cmd->cmdExecutor) { in RemoveCmdExecutor() 81 PluginCmdExecutor *cmdExec = ListEntry(node, PluginCmdExecutor, node); in RemoveCmdExecutor() 83 OH_ListRemove(&cmdExec->node); in RemoveCmdExecutor() 87 node = node->next; in RemoveCmdExecutor() 109 ListNode *node = cmd->cmdExecutor.next; in PluginExecCmd_() local 110 while (node != &cmd->cmdExecutor) { in PluginExecCmd_() 111 PluginCmdExecutor *cmdExec = ListEntry(node, PluginCmdExecutor, node); in PluginExecCmd_() [all …]
|
| /base/security/huks/test/unittest/huks_standard_test/module_test/utils_test/src/ |
| D | hks_double_list_test.cpp | 64 struct DoubleList node = { 0 }; variable 66 InitializeDoubleList(&node); 67 ASSERT_TRUE(node.prev == &node); 79 struct DoubleList node = { 0 }; variable 81 AddNodeAfterDoubleListHead(&head, &node); 82 ASSERT_TRUE(head.next == &node); 94 struct DoubleList node = { 0 }; variable 96 AddNodeAtDoubleListTail(&head, &node); 97 ASSERT_TRUE(head.prev == &node);
|
| /base/startup/init/services/param/base/ |
| D | param_trie.c | 77 ParamTrieNode *node = (ParamTrieNode *)(workSpace->area->data + workSpace->area->currOffset); in AllocateParamTrieNode() local 78 node->length = keyLen; in AllocateParamTrieNode() 79 int ret = PARAM_MEMCPY(node->key, keyLen, key, keyLen); in AllocateParamTrieNode() 81 node->key[keyLen] = '\0'; in AllocateParamTrieNode() 82 node->left = 0; in AllocateParamTrieNode() 83 node->right = 0; in AllocateParamTrieNode() 84 node->child = 0; in AllocateParamTrieNode() 85 node->dataIndex = 0; in AllocateParamTrieNode() 86 node->labelIndex = 0; in AllocateParamTrieNode() 130 static int CompareParamTrieNode(const ParamTrieNode *node, const char *key, uint32_t keyLen) in CompareParamTrieNode() argument [all …]
|
| /base/update/updater/utils/json/ |
| D | json_visitor.h | 47 …static bool VisitStruct(const JsonNode &node, const JsonNode &defaultNode, T &t, std::index_sequen… in VisitStruct() 53 node[key], defaultNode[key], FthMember, key)) { in VisitStruct() 60 return VisitStruct(node, defaultNode, t, std::index_sequence<R...> {}); in VisitStruct() 69 …static bool VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key) 71 auto r = node.As<T>(); 89 …static auto VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key) 91 …if ((node.Type() != NodeType::UNKNOWN && node.Type() != NodeType::NUL && node.Type() != NodeType::… 98 for (auto &subNode : node) { 117 …static bool VisitMember(const JsonNode &node, const JsonNode &defaultNode, T &obj, const char *key) 119 return StructVisitor<SETVAL>::VisitStruct(node, defaultNode, obj, [all …]
|
| /base/security/dlp_permission_service/interfaces/inner_api/dlp_fuse/src/ |
| D | dlp_link_manager.cpp | 72 DlpLinkFile *node = new (std::nothrow) DlpLinkFile(dlpLinkName, filePtr); in AddDlpLinkFile() local 73 if (node == nullptr) { in AddDlpLinkFile() 79 g_DlpLinkFileNameMap_[dlpLinkName] = node; in AddDlpLinkFile() 93 DlpLinkFile* node = iter->second; in StopDlpLinkFile() local 94 if (node == nullptr) { in StopDlpLinkFile() 98 if (filePtr == node->GetDlpFilePtr()) { in StopDlpLinkFile() 99 node->stopLink(); in StopDlpLinkFile() 101 … DLP_LOG_INFO(LABEL, "Stop link file success, file name %{public}s", node->GetLinkName().c_str()); in StopDlpLinkFile() 118 DlpLinkFile* node = iter->second; in RestartDlpLinkFile() local 119 if (node == nullptr) { in RestartDlpLinkFile() [all …]
|