Home
last modified time | relevance | path

Searched refs:node (Results 1 – 25 of 221) sorted by relevance

123456789

/base/security/huks/utils/list/
Dhks_double_list.c22 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/useriam/user_auth_framework/test/fuzztest/services/servicecore_fuzzer/src/
Dschedule_node_fuzzer.cpp59 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 …]
Dresource_node_fuzzer.cpp107 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/
Dcert_manager_session_mgr.c46 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/update/updater/test/unittest/utils/json/
Dutils_json_test.cpp57 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 …]
Dutils_json_visitor_test.cpp95 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/unittest/services/mocks/
Dmock_resource_node.h49 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/
Dinit_hashmap.c51 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/
Drule_cluster.cpp91 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/device_auth/test/unittest/deviceauth/source/
Ddevice_auth_ext_mock.c41 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/security/access_token/interfaces/innerkits/analysis_model/src/
Dcode_signature_analysis_kit.c30 AppRiskInfo *node = g_modelDataHead->next; in FindExistingNode() local
31 while (node != NULL) { in FindExistingNode()
32 if (node->tokenId == tokenId) { in FindExistingNode()
35 node = node->next; in FindExistingNode()
38 return node; in FindExistingNode()
41 static int32_t IsRiskStatusChanged(AppRiskInfo *node) in IsRiskStatusChanged() argument
45 RiskPolicyType policy = node->status.policy; in IsRiskStatusChanged()
48 TimeStampNode *tmp = ((node->errInfoList)[i]).timeStampChain; in IsRiskStatusChanged()
52 node->status.eventCount = eventCount; in IsRiskStatusChanged()
53 node->status.totalCount = totalCount; in IsRiskStatusChanged()
[all …]
/base/startup/init/services/include/
Dlist.h76 #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/
Dgroup_unittest.cpp32 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/
Dupdater_ui_config.cpp70 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 …]
Dupdater_ui_config.h32 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/
Dtrigger_manager.c35 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/security/selinux_adapter/interfaces/policycoreutils/src/
Dselinux_map.c43 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 …]
Dsehap_contexts_trie.cpp47 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/param/adapter/
Dparam_selinux.c156 ParamNode *node = GetParamNode(WORKSPACE_INDEX_BASE, name); in GetWorkSpaceSize() local
157 if (node == NULL) { in GetWorkSpaceSize()
164 ret = PARAM_MEMCPY(name, sizeof(name) - 1, node->data + node->keyLength + 1, node->valueLength); in GetWorkSpaceSize()
166 name[node->valueLength] = '\0'; in GetWorkSpaceSize()
191 ParamContextsList *node = selinuxSpace->getParamList(); in SelinuxGetAllLabel() local
193 while (node != NULL) { in SelinuxGetAllLabel()
195 node->info.index, node->info.paraName, node->info.paraContext); in SelinuxGetAllLabel()
196 if (node->info.paraContext == NULL || node->info.paraName == NULL) { in SelinuxGetAllLabel()
197 node = node->next; in SelinuxGetAllLabel()
200 handleSelinuxLabel(&node->info, readOnly); in SelinuxGetAllLabel()
[all …]
/base/startup/init/services/param/watcher/proxy/
Dwatcher_manager.cpp163 …TraversalNode([this, mananger, name, value](ParamWatcherListPtr list, WatcherNodePtr node, uint32_… in ProcessParameterChange() argument
164 auto remoteWatcher = mananger->GetRemoteWatcher(node->GetNodeId()); in ProcessParameterChange()
356 …remoteWatchers_->TraversalNodeSafe([this](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t … in OnStop() argument
357 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in OnStop()
381 [this, remoteWatcher](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t index) { in OnRemoteDied() argument
382 auto group = GetWatcherGroup(node->GetNodeId()); in OnRemoteDied()
399 WatcherNodePtr node = remoteWatchers_->GetNextNode(nullptr); in GetRemoteWatcher() local
400 while (node != nullptr) { in GetRemoteWatcher()
401 RemoteWatcherPtr remoteWatcher = ConvertTo<RemoteWatcher>(node); in GetRemoteWatcher()
408 node = remoteWatchers_->GetNextNode(node); in GetRemoteWatcher()
[all …]
/base/security/huks/test/unittest/huks_standard_test/module_test/utils_test/src/
Dhks_double_list_test.cpp66 struct DoubleList node = { 0 }; variable
68 InitializeDoubleList(&node);
69 ASSERT_TRUE(node.prev == &node);
81 struct DoubleList node = { 0 }; variable
83 AddNodeAfterDoubleListHead(&head, &node);
84 ASSERT_TRUE(head.next == &node);
96 struct DoubleList node = { 0 }; variable
98 AddNodeAtDoubleListTail(&head, &node);
99 ASSERT_TRUE(head.prev == &node);
/base/startup/init/services/init/standard/
Dinit_cmdexecutor.c54 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/startup/init/services/param/base/
Dparam_trie.c73 ParamTrieNode *node = (ParamTrieNode *)(workSpace->area->data + workSpace->area->currOffset); in AllocateParamTrieNode() local
74 node->length = keyLen; in AllocateParamTrieNode()
75 int ret = PARAM_MEMCPY(node->key, keyLen, key, keyLen); in AllocateParamTrieNode()
77 node->key[keyLen] = '\0'; in AllocateParamTrieNode()
78 node->left = 0; in AllocateParamTrieNode()
79 node->right = 0; in AllocateParamTrieNode()
80 node->child = 0; in AllocateParamTrieNode()
81 node->dataIndex = 0; in AllocateParamTrieNode()
82 node->labelIndex = 0; in AllocateParamTrieNode()
126 static int CompareParamTrieNode(const ParamTrieNode *node, const char *key, uint32_t keyLen) in CompareParamTrieNode() argument
[all …]
/base/update/updater/utils/json/
Djson_visitor.h47 …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/useriam/user_auth_framework/test/unittest/services/src/
Dresource_node_test.cpp58 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
59 EXPECT_EQ(node, nullptr);
73 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
74 ASSERT_NE(node, nullptr);
76 EXPECT_EQ(node->GetExecutorIndex(), DEST_EXECUTOR_INDEX);
104 auto node = ResourceNode::MakeNewResource(info, nullptr, templateIdList, fwkPublicKey); variable
106 ASSERT_NE(node, nullptr);
108 EXPECT_EQ(node->GetExecutorIndex(), DEST_EXECUTOR_INDEX);
125 auto node = ResourceNode::MakeNewResource(info, testCallback, templateIdList, fwkPublicKey); variable
126 EXPECT_NE(node, nullptr);
[all …]

123456789