summaryrefslogtreecommitdiff
path: root/util/getpir/checksum.c
blob: bcf342573f3602b55d3539c0992d5bf268f5b92b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "pirq_routing.h"
#include "checksum.h"

int calc_checksum(struct irq_routing_table *rt)
{
	long i;
	uint8_t *addr, sum = 0;

	addr = (uint8_t *) rt;
	for (i = 0; i < rt->size; i++)
		sum += addr[i];
	return (sum);
}