Searched refs:sum (Results 1 – 4 of 4) sorted by relevance
68 uint32_t sum = startsum; in checksum() local72 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() argument86 return ~sum & 0xffff; in finish_sum()166 uint32_t sum; in receive_packet() local210 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()[all …]
20 int sum; in hd_main() local64 sum = 0; in hd_main()78 sum += buf[i]; in hd_main()93 printf("sum %x\n", sum); in hd_main()
102 int sum = 0; in show_total_size() local122 sum += s.st_blocks / 2; in show_total_size()125 printf("total %d\n", sum); in show_total_size()
215 unsigned sum; in send_packet() local222 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() local1183 sum = 0; in check_data()1185 sum += *x++; in check_data()1188 if(sum != p->msg.data_check) { in check_data()