Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 6 of 6) 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.c103 int sum = 0; in show_total_size() local
123 sum += s.st_blocks / 2; in show_total_size()
126 printf("total %d\n", sum); in show_total_size()
/system/extras/tests/ext4/
Drand_emmc_perf.c54 struct timeval sum = { 0 }; in print_stats() local
80 timeradd(&sum, &t, &sum); in print_stats()
88 total_usecs = (sum.tv_sec * 1000000LL) + sum.tv_usec; in print_stats()
/system/core/libmemtrack/
Dmemtrack.c143 ssize_t sum = 0; in memtrack_proc_sum() local
151 sum += p->types[type].records[j].size_in_bytes; in memtrack_proc_sum()
156 return sum; in memtrack_proc_sum()
/system/core/adb/
Dtransport.c220 unsigned sum; in send_packet() local
227 sum = 0; in send_packet()
229 sum += *x++; in send_packet()
231 p->msg.data_check = sum; in send_packet()
1217 unsigned count, sum; in check_data() local
1222 sum = 0; in check_data()
1224 sum += *x++; in check_data()
1227 if(sum != p->msg.data_check) { in check_data()