From 08b6a617e862ffc7b7460abb79fe4c198806517c Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 29 Aug 2017 19:17:35 +0200 Subject: RAdv: Some style nitpicks --- proto/radv/packets.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'proto/radv/packets.c') diff --git a/proto/radv/packets.c b/proto/radv/packets.c index 088d177c..19d71f97 100644 --- a/proto/radv/packets.c +++ b/proto/radv/packets.c @@ -209,16 +209,16 @@ static int radv_prepare_prefix(struct radv_iface *ifa, struct radv_prefix *prefix, char **buf, char *bufend) { - struct radv_prefix_config *pc = prefix->config; - struct radv_opt_prefix *op = (void *) *buf; + struct radv_prefix_config *pc = prefix->cf; - if (*buf + sizeof(*op) > bufend) + if (*buf + sizeof(struct radv_opt_prefix) > bufend) { - log(L_WARN "%s: Too many prefixes on interface %s", ifa->ra->p.name, - ifa->iface->name); + log(L_WARN "%s: Too many prefixes on interface %s", + ifa->ra->p.name, ifa->iface->name); return -1; } + struct radv_opt_prefix *op = (void *) *buf; op->type = OPT_PREFIX; op->length = 4; op->pxlen = prefix->len; -- cgit v1.2.3