freebsd5/sys/kern/subr_msgbuf.c
/*
 * Compute the checksum for the complete message buffer contents.
 */
Compute the checksum for the complete message buffer contents.
Compute the checksum for the complete message buffer contents .
static u_int
msgbuf_cksum(struct msgbuf *mbp)
{
	u_int i, sum;
	sum = 0;
	for (i = 0; i < mbp->msg_size; i++)
		sum += (u_char)mbp->msg_ptr[i];
	return (sum);
}
static u_int msgbuf_cksum ( struct msgbuf * mbp ) { u_int i , sum ; sum = 0 ; for ( i = 0 ; i < mbp -> msg_size ; i ++ ) sum += ( u_char ) mbp -> msg_ptr [ i ] ; return ( sum ) ; }
Compute the checksum for the complete message buffer contents.
Compute the checksum for the complete message buffer contents .