/base/security/huks/utils/list/ |
D | hks_double_list.c | 32 void AddNodeAfterDoubleListHead(struct DoubleList *head, struct DoubleList *node) in AddNodeAfterDoubleListHead() argument 34 if ((head == NULL) || (node == NULL)) { in AddNodeAfterDoubleListHead() 38 if (head->next == NULL) { in AddNodeAfterDoubleListHead() 39 head->next = head; 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() 48 void AddNodeAtDoubleListTail(struct DoubleList *head, struct DoubleList *node) in AddNodeAtDoubleListTail() argument 50 if ((head == NULL) || (node == NULL)) { in AddNodeAtDoubleListTail() [all …]
|
D | hks_double_list.h | 30 void AddNodeAfterDoubleListHead(struct DoubleList *head, struct DoubleList *node); 32 void AddNodeAtDoubleListTail(struct DoubleList *head, struct DoubleList *node); 45 #define HKS_DLIST_ITER(st, head) \ argument 47 …for (p = (head)->next, (st) = (__typeof__(st))p; p != (head); p = p->next, (st) = (__typeof__(st))… 49 #define HKS_DLIST_SAFT_ITER(st, head) \ argument 52 for (p = (head)->next, (st) = (__typeof__(st))p, _tmp = *p; p != (head); \
|
/base/startup/init/services/utils/ |
D | list.c | 45 void OH_ListAddTail(struct ListNode *head, struct ListNode *item) in OH_ListAddTail() argument 47 if (head == NULL || item == NULL) { in OH_ListAddTail() 50 item->next = head; in OH_ListAddTail() 51 item->prev = head->prev; in OH_ListAddTail() 52 head->prev->next = item; in OH_ListAddTail() 53 head->prev = item; in OH_ListAddTail() 83 void OH_ListAddWithOrder(struct ListNode *head, struct ListNode *item, ListCompareProc compareProc) in OH_ListAddWithOrder() argument 87 if (head == NULL || item == NULL || compareProc == NULL) { in OH_ListAddWithOrder() 91 match = head->next; in OH_ListAddWithOrder() 92 while ((match != NULL) && (match != head)) { in OH_ListAddWithOrder() [all …]
|
/base/security/device_security_level/baselib/utils/include/ |
D | utils_list.h | 45 static inline int IsEmptyList(ListHead *head) in IsEmptyList() argument 47 return head->next == head; in IsEmptyList() 50 static inline void InitListHead(ListHead *head) in InitListHead() argument 52 head->next = head; in InitListHead() 53 head->prev = head; in InitListHead() 61 #define FOREACH_LIST_NODE(item, head) for ((item) = (head)->next; (item) != (head); (item) = (item)… argument 63 #define FOREACH_LIST_NODE_SAFE(item, head, temp) \ argument 64 …for ((item) = (head)->next, (temp) = (item)->next; (item) != (head); (item) = (temp), (temp) = (it…
|
/base/sensors/sensor/utils/ipc/src/ |
D | stream_socket.cpp | 53 PackHead *head = reinterpret_cast<PackHead *>(buf); in OnReadPackets() local 54 CHKPB(head); in OnReadPackets() 55 if (head->size < 0 || head->size > MAX_PACKET_BUF_SIZE) { in OnReadPackets() 57 " head->size:%{public}zu, unreadSize:%{public}zu", head->size, unreadSize); in OnReadPackets() 61 if (head->size > dataSize) { in OnReadPackets() 64 NetPacket pkt(head->idMsg); in OnReadPackets() 65 if ((head->size > 0) && (!pkt.Write(&buf[headSize], head->size))) { in OnReadPackets() 67 "size:%{public}zu", head->idMsg, head->size); in OnReadPackets()
|
D | net_packet.cpp | 33 PACKHEAD head = {msgId_, StreamBufferGetWpos(streamBufferPtr_.get())}; in MakeData() local 34 buf << head; in MakeData() 42 PACKHEAD head = {msgId_, wPos_}; in MakeData() 43 buf << head; in MakeData()
|
/base/startup/init/services/param/trigger/ |
D | trigger_manager.c | 305 TriggerHeader *head = GetTriggerHeader(workSpace, trigger->type); in FreeTrigger() local 306 if (head != NULL) { in FreeTrigger() 307 head->delTrigger(workSpace, trigger); in FreeTrigger() 314 TriggerHeader *head = GetTriggerHeader(workSpace, type); in ClearTrigger() local 315 PARAM_CHECK(head != NULL, return, "Failed to get header %d", type); in ClearTrigger() 316 TriggerNode *trigger = head->nextTrigger(head, NULL); in ClearTrigger() 318 TriggerNode *next = head->nextTrigger(head, trigger); in ClearTrigger() 322 OH_ListInit(&head->triggerList); in ClearTrigger() 395 TriggerHeader *head = GetTriggerHeader(workSpace, type); in ExecTriggerMatch_() local 396 PARAM_CHECK(head != NULL, return 0, "Failed to get header %d", type); in ExecTriggerMatch_() [all …]
|
/base/security/huks/test/unittest/huks_standard_test/module_test/utils_test/src/ |
D | hks_double_list_test.cpp | 80 struct DoubleList head = { .prev = nullptr, .next = nullptr }; variable 83 AddNodeAfterDoubleListHead(&head, &node); 84 ASSERT_TRUE(head.next == &node); 95 struct DoubleList head = { .prev = nullptr, .next = nullptr }; variable 98 AddNodeAtDoubleListTail(&head, &node); 99 ASSERT_TRUE(head.prev == &node); 110 struct DoubleList head = { .prev = nullptr, .next = nullptr }; variable 112 RemoveDoubleListNode(&head); 113 EXPECT_EQ(head.next == nullptr, true); 114 EXPECT_EQ(head.prev == nullptr, true);
|
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/ |
D | dlp_file_kits.cpp | 107 static bool IsValidDlpHeader(const struct DlpHeader& head) in IsValidDlpHeader() argument 109 if (head.magic != DLP_FILE_MAGIC || head.certSize == 0 || head.certSize > DLP_MAX_CERT_SIZE || in IsValidDlpHeader() 110 head.contactAccountSize == 0 || head.contactAccountSize > DLP_MAX_CERT_SIZE || in IsValidDlpHeader() 111 head.certOffset != sizeof(struct DlpHeader) || in IsValidDlpHeader() 112 head.contactAccountOffset != (sizeof(struct DlpHeader) + head.certSize) || in IsValidDlpHeader() 113 …head.txtOffset != (sizeof(struct DlpHeader) + head.certSize + head.contactAccountSize + head.offli… in IsValidDlpHeader() 114 head.txtSize > DLP_MAX_CONTENT_SIZE || head.offlineCertSize > DLP_MAX_CERT_SIZE) { in IsValidDlpHeader() 137 struct DlpHeader head; in IsDlpFile() local 138 if (read(dlpFd, &head, sizeof(struct DlpHeader)) != sizeof(struct DlpHeader)) { in IsDlpFile() 148 return IsValidDlpHeader(head); in IsDlpFile()
|
/base/hiviewdfx/hilog_lite/services/hilogcat/ |
D | hiview_logcat.c | 55 struct HiLogEntry *head = (struct HiLogEntry *)buf; in main() local 60 unsigned int sec = head->sec; in main() 65 printFlag = FilterLevelLog(g_hiviewConfig.level, *(head->msg)); in main() 70 printFlag = FilterModuleLog(g_hiviewConfig.logOutputModule, (head->msg) + MODULE_OFFSET); in main() 79 info->tm_sec, head->nsec / NANOSEC_PER_MIRCOSEC, head->pid, head->taskId, head->msg); in main()
|
/base/msdp/device_status/utils/ipc/src/ |
D | stream_socket.cpp | 91 PackHead *head = reinterpret_cast<PackHead *>(buf); in OnReadPackets() local 92 CHKPB(head); in OnReadPackets() 93 …if (static_cast<int32_t>(head->size) < 0 || static_cast<size_t>(head->size) > MAX_PACKET_BUF_SIZE)… in OnReadPackets() 95 "head->size:%{public}d, unreadSize:%{public}d", head->size, unreadSize); in OnReadPackets() 99 if (head->size > dataSize) { in OnReadPackets() 102 NetPacket pkt(head->idMsg); in OnReadPackets() 103 if ((head->size > 0) && (!pkt.Write(&buf[headSize], head->size))) { in OnReadPackets() 105 "size:%{public}d", head->idMsg, head->size); in OnReadPackets()
|
D | net_packet.cpp | 30 PACKHEAD head = {msgId_, wPos_}; in MakeData() local 31 buf << head; in MakeData()
|
/base/security/permission_lite/services/pms/src/ |
D | perm_operate.c | 25 TNode *cur = list->head; in PermissionIsGranted() 58 if (list->head == NULL) { in AddTask() 59 list->head = node; in AddTask() 61 node->next = list->head; in AddTask() 62 list->head = node; in AddTask() 68 TNode *cur = list->head; in DeleteTask() 73 list->head = cur->next; in DeleteTask() 88 TNode *cur = list->head; in GetTaskWithUid() 100 TNode *cur = list->head; in GetTaskWithPkgName()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/ |
D | cert_manager_double_list.h | 47 #define CM_DLIST_ITER(st, head) \ argument 49 …for (p = (head)->next, (st) = (__typeof__(st))p; p != (head); p = p->next, (st) = (__typeof__(st))… 51 #define CM_DLIST_SAFT_ITER(st, head) \ argument 54 for (p = (head)->next, (st) = (__typeof__(st))p, tmp = *p; p != (head); \
|
/base/security/device_security_level/services/dslm/ |
D | dslm_msg_utils.c | 38 JsonHandle head = CreateJson(NULL); in GenerateSecInfoResponseJson() local 39 if (head == NULL) { in GenerateSecInfoResponseJson() 45 DestroyJson(head); in GenerateSecInfoResponseJson() 49 AddFieldIntToJson(head, FIELD_MESSAGE, MSG_TYPE_DSLM_CRED_RESPONSE); in GenerateSecInfoResponseJson() 50 AddFieldJsonToJson(head, FIELD_PAYLOAD, body); in GenerateSecInfoResponseJson() 64 out = (uint8_t *)ConvertJsonToString(head); in GenerateSecInfoResponseJson() 66 if (head != NULL) { in GenerateSecInfoResponseJson() 67 DestroyJson(head); in GenerateSecInfoResponseJson() 82 JsonHandle head = CreateJson(NULL); in GenerateSecInfoRequestJson() local 83 if (head == NULL) { in GenerateSecInfoRequestJson() [all …]
|
/base/hiviewdfx/hilog_lite/services/apphilogcat/ |
D | hiview_applogcat.c | 195 struct HiLogEntry *head = (struct HiLogEntry *)buf; in main() local 197 if (NeedFlush(head->msg)) { in main() 207 unsigned int sec = head->sec; in main() 212 printFlag = FilterLevelLog(g_hiviewConfig.level, *(head->msg)); in main() 217 printFlag = FilterModuleLog(g_hiviewConfig.logOutputModule, (head->msg) + MODULE_OFFSET); in main() 229 …info->tm_min, info->tm_sec, head->nsec / NANOSEC_PER_MIRCOSEC, head->pid, head->taskId, head->msg); in main() 234 …info->tm_min, info->tm_sec, head->nsec / NANOSEC_PER_MIRCOSEC, head->pid, head->taskId, head->msg); in main()
|
/base/startup/init/services/include/ |
D | list.h | 131 void OH_ListAddWithOrder(struct ListNode *head, struct ListNode *item, ListCompareProc compareProc); 151 ListNode *OH_ListFind(const ListNode *head, void *data, ListTraversalProc compareProc); 172 int OH_ListTraversal(ListNode *head, void *data, ListTraversalProc traversalProc, unsigned int flag… 189 void OH_ListRemoveAll(ListNode *head, ListDestroyProc destroyProc); 197 int OH_ListGetCnt(const ListNode *head);
|
/base/startup/init/test/unittest/param/ |
D | param_stub.cpp | 125 ParamContextsList *head = *list; in TestDestroyParamList() local 126 while (head != nullptr) { in TestDestroyParamList() 127 ParamContextsList *next = head->next; in TestDestroyParamList() 128 free((void *)head->info.paraName); in TestDestroyParamList() 129 free((void *)head->info.paraContext); in TestDestroyParamList() 130 free(head); in TestDestroyParamList() 131 head = next; in TestDestroyParamList() 138 ParamContextsList *head = (ParamContextsList *)malloc(sizeof(ParamContextsList)); in TestGetParamList() local 139 BEGET_ERROR_CHECK(head != nullptr, return nullptr, "Failed to alloc ParamContextsList"); in TestGetParamList() 140 head->info.paraName = strdup(selinuxLabels[0][0]); in TestGetParamList() [all …]
|
/base/security/device_security_level/baselib/utils/src/ |
D | utils_work_queue.c | 31 ListHead head; member 57 while ((IsEmptyList(&queue->head)) && (queue->state == RUN)) { in WorkQueueThread() 65 worker = LIST_ENTRY(queue->head.next, Worker, linkNode); in WorkQueueThread() 76 while (!IsEmptyList(&queue->head)) { in WorkQueueThread() 77 worker = LIST_ENTRY(queue->head.next, Worker, linkNode); in WorkQueueThread() 95 InitListHead(&(queue->head)); in CreateWorkQueue() 173 AddListNodeBefore(&worker->linkNode, &queue->head); in QueueWork()
|
D | utils_state_machine.c | 64 ListHead *head = &machine->pendingEventList; in PopPendingEvent() local 65 if (IsEmptyList(head)) { in PopPendingEvent() 68 PendingEvent *pending = LIST_ENTRY(head->next, PendingEvent, link); in PopPendingEvent()
|
/base/security/device_security_level/services/sa/lite/ |
D | dslm_ipc_process.c | 35 static DslmRemoteStubListNode head = { in GetRemoteStubList() local 36 .node = INIT_LIST(head.node), in GetRemoteStubList() 41 static DslmRemoteStubList stubList = { .head = &head, .size = 0, .mutex = &mutex}; in GetRemoteStubList() 97 AddListNode(&item->node, &GetRemoteStubList()->head->node); in DslmPushRemoteStub() 111 FOREACH_LIST_NODE_SAFE (node, &GetRemoteStubList()->head->node, temp) { in DslmPopRemoteStub()
|
/base/security/access_token/interfaces/innerkits/analysis_model/src/ |
D | code_signature_analysis_kit.c | 75 TimeStampNode *head = ((node->errInfoList)[report->errorType]).timeStampChain; in DataPreProcess() local 77 TimeStampNode *tmpNode = head->next; in DataPreProcess() 78 TimeStampNode *tmpNodePrev = head; in DataPreProcess() 90 head->timeStamp.timeStampCount--; in DataPreProcess() 105 tmp->next = head->next; in DataPreProcess() 106 head->next = tmp; in DataPreProcess() 107 head->timeStamp.timeStampCount++; in DataPreProcess() 147 TimeStampNode *head = (node->errInfoList[i]).timeStampChain->next; in ReleaseTimeStampChain() local 148 while (head != NULL) { in ReleaseTimeStampChain() 149 TimeStampNode *tmp = head->next; in ReleaseTimeStampChain() [all …]
|
/base/startup/init/services/param/adapter/ |
D | param_dac.c | 275 char *head = str; in UserNameTrim() local 277 while (head < end && (*head == ' ' || *head == '\t' || *head == '\n' || *head == '\r')) { in UserNameTrim() 278 *head = '\0'; in UserNameTrim() 279 head++; in UserNameTrim() 284 return head; in UserNameTrim()
|
/base/telephony/ril_adapter/services/vendor/src/ |
D | at_modem.c | 111 if (pResponse->head != NULL) { in ReqGetRadioState() 112 pLine = pResponse->head->data; in ReqGetRadioState() 152 if (responseInfo->head == NULL) { in ReqGetImei() 157 char *imeiSn = responseInfo->head->data; in ReqGetImei() 189 if (responseInfo->head == NULL) { in ReqGetMeid() 194 char *meidSn = responseInfo->head->data; in ReqGetMeid() 319 if (responseInfo->head != NULL) { in ReqGetVoiceRadioTechnology() 320 result = responseInfo->head->data; in ReqGetVoiceRadioTechnology()
|
/base/startup/init/services/sandbox/ |
D | sandbox.c | 183 static void RemoveOldSandboxMountListNode(ListNode *head, const char *targetMount) in RemoveOldSandboxMountListNode() argument 185 if ((head == NULL) || (targetMount == NULL)) { in RemoveOldSandboxMountListNode() 188 ListNode *node = OH_ListFind(head, (void *)targetMount, CompareSandboxListForMountTarget); in RemoveOldSandboxMountListNode() 209 static void RemoveOldSandboxLinkListNode(ListNode *head, const char *linkName) in RemoveOldSandboxLinkListNode() argument 211 if ((head == NULL) || (linkName == NULL)) { in RemoveOldSandboxLinkListNode() 214 ListNode *node = OH_ListFind(head, (void *)linkName, CompareSandboxListForLinkName); in RemoveOldSandboxLinkListNode() 492 static int MountSandboxInfo(struct ListNode *head, const char *rootPath, SandboxTag tag) in MountSandboxInfo() argument 494 if ((head == NULL) || (rootPath == NULL)) { in MountSandboxInfo() 497 int ret = OH_ListTraversal(head, (void *)rootPath, MountSandboxNode, 1); in MountSandboxInfo() 523 static int LinkSandboxInfo(struct ListNode *head, const char *rootPath) in LinkSandboxInfo() argument [all …]
|