diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-05 01:26:38 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-05 01:26:38 +0000 |
commit | 779d6b5b6f9cf3f0915816afee9f22ef957f84ae (patch) | |
tree | 9d5f095e71d753a0a418541392add05a749b2016 /usr.sbin | |
parent | 6dcbe704b1a96000617e22d5f029a4dee60fc250 (diff) |
use the sizeof the struct not the sizeof a pointer to the struct
ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dvmrpd/ask_nbrs2.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/graft.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/graft_ack.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/nbrs2.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/probe.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/prune.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/report.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospf6d/packet.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/auth.c | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/usr.sbin/dvmrpd/ask_nbrs2.c b/usr.sbin/dvmrpd/ask_nbrs2.c index 4b22dcac002..92c18b5c2d4 100644 --- a/usr.sbin/dvmrpd/ask_nbrs2.c +++ b/usr.sbin/dvmrpd/ask_nbrs2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ask_nbrs2.c,v 1.3 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: ask_nbrs2.c,v 1.4 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2006 Esben Norby <norby@openbsd.org> @@ -58,7 +58,7 @@ send_ask_nbrs2(struct iface *iface, struct in_addr addr, void *data, int len) dst.sin_addr.s_addr = addr.s_addr; /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/graft.c b/usr.sbin/dvmrpd/graft.c index b3be63ded8d..c018fa9181a 100644 --- a/usr.sbin/dvmrpd/graft.c +++ b/usr.sbin/dvmrpd/graft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: graft.c,v 1.3 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: graft.c,v 1.4 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org> @@ -58,7 +58,7 @@ send_graft(struct iface *iface, struct in_addr addr, void *data, int len) dst.sin_addr.s_addr = addr.s_addr; /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/graft_ack.c b/usr.sbin/dvmrpd/graft_ack.c index 3407c435734..6616ce7fdee 100644 --- a/usr.sbin/dvmrpd/graft_ack.c +++ b/usr.sbin/dvmrpd/graft_ack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: graft_ack.c,v 1.3 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: graft_ack.c,v 1.4 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2006 Esben Norby <norby@openbsd.org> @@ -58,7 +58,7 @@ send_graft_ack(struct iface *iface, struct in_addr addr, void *data, int len) dst.sin_addr.s_addr = addr.s_addr; /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/nbrs2.c b/usr.sbin/dvmrpd/nbrs2.c index 4b4d44706c5..5217bb03a11 100644 --- a/usr.sbin/dvmrpd/nbrs2.c +++ b/usr.sbin/dvmrpd/nbrs2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nbrs2.c,v 1.3 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: nbrs2.c,v 1.4 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2006 Esben Norby <norby@openbsd.org> @@ -58,7 +58,7 @@ send_nbrs2(struct iface *iface, struct in_addr addr, void *data, int len) dst.sin_addr.s_addr = addr.s_addr; /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/probe.c b/usr.sbin/dvmrpd/probe.c index 2f0d07417ad..0a6e02f31a5 100644 --- a/usr.sbin/dvmrpd/probe.c +++ b/usr.sbin/dvmrpd/probe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: probe.c,v 1.3 2014/11/18 20:54:28 krw Exp $ */ +/* $OpenBSD: probe.c,v 1.4 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org> @@ -68,7 +68,7 @@ send_probe(struct iface *iface) inet_aton(AllDVMRPRouters, &dst.sin_addr); /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/prune.c b/usr.sbin/dvmrpd/prune.c index 54812752861..c99f01d76db 100644 --- a/usr.sbin/dvmrpd/prune.c +++ b/usr.sbin/dvmrpd/prune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prune.c,v 1.4 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: prune.c,v 1.5 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org> @@ -70,7 +70,7 @@ send_prune(struct nbr *nbr, struct prune *p) ibuf_add(buf, &prune, sizeof(prune)); /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(nbr->iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/dvmrpd/report.c b/usr.sbin/dvmrpd/report.c index 87f0c85d0ff..9ce61919f03 100644 --- a/usr.sbin/dvmrpd/report.c +++ b/usr.sbin/dvmrpd/report.c @@ -1,4 +1,4 @@ -/* $OpenBSD: report.c,v 1.9 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: report.c,v 1.10 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org> @@ -64,7 +64,7 @@ send_report(struct iface *iface, struct in_addr addr, void *data, int len) dst.sin_addr.s_addr = addr.s_addr; /* update chksum */ - dvmrp_hdr = ibuf_seek(buf, 0, sizeof(dvmrp_hdr)); + dvmrp_hdr = ibuf_seek(buf, 0, sizeof(*dvmrp_hdr)); dvmrp_hdr->chksum = in_cksum(buf->buf, buf->wpos); ret = send_packet(iface, buf->buf, buf->wpos, &dst); diff --git a/usr.sbin/ospf6d/packet.c b/usr.sbin/ospf6d/packet.c index 56becec86c7..bc887e2fcb3 100644 --- a/usr.sbin/ospf6d/packet.c +++ b/usr.sbin/ospf6d/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.13 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: packet.c,v 1.14 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -65,7 +65,7 @@ upd_ospf_hdr(struct ibuf *buf, struct iface *iface) { struct ospf_hdr *ospf_hdr; - if ((ospf_hdr = ibuf_seek(buf, 0, sizeof(ospf_hdr))) == NULL) + if ((ospf_hdr = ibuf_seek(buf, 0, sizeof(*ospf_hdr))) == NULL) fatalx("upd_ospf_hdr: buf_seek failed"); /* update length */ diff --git a/usr.sbin/ospfd/auth.c b/usr.sbin/ospfd/auth.c index 63d6bb0b705..a50c3f0b9e4 100644 --- a/usr.sbin/ospfd/auth.c +++ b/usr.sbin/ospfd/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.19 2010/09/02 14:03:21 sobrado Exp $ */ +/* $OpenBSD: auth.c,v 1.20 2015/05/05 01:26:37 jsg Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -144,7 +144,7 @@ auth_gen(struct ibuf *buf, struct iface *iface) struct ospf_hdr *ospf_hdr; struct auth_md *md; - if ((ospf_hdr = ibuf_seek(buf, 0, sizeof(ospf_hdr))) == NULL) + if ((ospf_hdr = ibuf_seek(buf, 0, sizeof(*ospf_hdr))) == NULL) fatalx("auth_gen: buf_seek failed"); /* update length */ |