Lines Matching defs:sum
936 void read_sum_head(int f, struct sum_struct *sum)
938 sum->count = read_int(f);
939 if (sum->count < 0) {
941 (long)sum->count, who_am_i());
944 sum->blength = read_int(f);
945 if (sum->blength < 0 || sum->blength > MAX_BLOCK_SIZE) {
947 (long)sum->blength, who_am_i());
950 sum->s2length = protocol_version < 27 ? csum_length : (int)read_int(f);
951 if (sum->s2length < 0 || sum->s2length > MD4_SUM_LENGTH) {
953 sum->s2length, who_am_i());
956 sum->remainder = read_int(f);
957 if (sum->remainder < 0 || sum->remainder > sum->blength) {
959 (long)sum->remainder, who_am_i());
964 /* Send the values from a sum_struct over the socket. Set sum to
967 void write_sum_head(int f, struct sum_struct *sum)
971 if (sum == NULL)
972 sum = &null_sum;
974 write_int(f, sum->count);
975 write_int(f, sum->blength);
977 write_int(f, sum->s2length);
978 write_int(f, sum->remainder);