diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2004-11-08 11:59:38 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2004-11-08 11:59:38 +0000 |
commit | d9e24fb84553cc14a3703303307ad88cc8c0cbb6 (patch) | |
tree | 14e987531bfe65ae87da3eb883b8e936c015c940 | |
parent | ab90c6b439cd7710f00853fc63ad1c20ca280839 (diff) |
make lint happy and honor const.
ok ho@
-rw-r--r-- | sbin/isakmpd/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c index 598c2ec7a91..3b904e43a2e 100644 --- a/sbin/isakmpd/log.c +++ b/sbin/isakmpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.49 2004/08/08 19:11:06 deraadt Exp $ */ +/* $OpenBSD: log.c,v 1.50 2004/11/08 11:59:37 hshoexer Exp $ */ /* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */ /* @@ -670,7 +670,7 @@ udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d) for (i = 0; i < hdrlen; i += 2) sum += phu.pa[i / 2]; - sp = (u_int16_t *) u; + sp = (const u_int16_t *)u; for (i = 0; i < (int)sizeof(struct udphdr); i += 2) sum += *sp++; @@ -700,7 +700,7 @@ in_cksum(const u_int16_t *w, int len) nleft -= 2; } if (nleft == 1) - sum += htons(*(u_char *) w << 8); + sum += htons(*(const u_char *)w << 8); sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ sum += (sum >> 16); /* add carry */ |