Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 4 of 4) sorted by relevance

/system/core/libnetutils/
Dpacket.c68 uint32_t sum = startsum; in checksum() local
72 sum += *up++; in checksum()
76 sum += (uint16_t) *(uint8_t *)up; in checksum()
78 while ((upper16 = (sum >> 16)) != 0) { in checksum()
79 sum = (sum & 0xffff) + upper16; in checksum()
81 return sum; in checksum()
84 static uint32_t finish_sum(uint32_t sum) in finish_sum() argument
86 return ~sum & 0xffff; in finish_sum()
166 uint32_t sum; in receive_packet() local
210 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()
[all …]
/system/core/toolbox/
Dhd.c20 int sum; in hd_main() local
64 sum = 0; in hd_main()
78 sum += buf[i]; in hd_main()
93 printf("sum %x\n", sum); in hd_main()
Dls.c102 int sum = 0; in show_total_size() local
122 sum += s.st_blocks / 2; in show_total_size()
125 printf("total %d\n", sum); in show_total_size()
/system/core/adb/
Dtransport.c215 unsigned sum; in send_packet() local
222 sum = 0; in send_packet()
224 sum += *x++; in send_packet()
226 p->msg.data_check = sum; in send_packet()
1178 unsigned count, sum; in check_data() local
1183 sum = 0; in check_data()
1185 sum += *x++; in check_data()
1188 if(sum != p->msg.data_check) { in check_data()