summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-08 20:43:26 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-08 20:44:53 +0100
commit0d6f7fd6fd9dcaa62fb77a10d3a1ad8d0d74f980 (patch)
treedb39fd913f349a353a62ead250210aab49a8cc09 /nhrpd
parentMerge pull request #5924 from donaldsharp/more_func (diff)
downloadfrr-0d6f7fd6fd9dcaa62fb77a10d3a1ad8d0d74f980.tar.xz
frr-0d6f7fd6fd9dcaa62fb77a10d3a1ad8d0d74f980.zip
*: Replace `sizeof something` to sizeof(something)
Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/netlink_arp.c4
-rw-r--r--nhrpd/nhrp_cache.c4
-rw-r--r--nhrpd/nhrp_interface.c10
-rw-r--r--nhrpd/nhrp_nhs.c4
-rw-r--r--nhrpd/nhrp_peer.c32
-rw-r--r--nhrpd/nhrp_route.c8
-rw-r--r--nhrpd/nhrp_shortcut.c20
-rw-r--r--nhrpd/nhrp_vc.c4
-rw-r--r--nhrpd/nhrp_vty.c28
-rw-r--r--nhrpd/vici.c6
10 files changed, 60 insertions, 60 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c
index 6666c6e96..8fd8280c5 100644
--- a/nhrpd/netlink_arp.c
+++ b/nhrpd/netlink_arp.c
@@ -95,7 +95,7 @@ static void netlink_neigh_msg(struct nlmsghdr *msg, struct zbuf *zb)
if (msg->nlmsg_type == RTM_GETNEIGH) {
debugf(NHRP_DEBUG_KERNEL, "Netlink: who-has %s dev %s",
- sockunion2str(&addr, buf, sizeof buf), ifp->name);
+ sockunion2str(&addr, buf, sizeof(buf)), ifp->name);
if (c->cur.type >= NHRP_CACHE_CACHED) {
nhrp_cache_set_used(c, 1);
@@ -104,7 +104,7 @@ static void netlink_neigh_msg(struct nlmsghdr *msg, struct zbuf *zb)
}
} else {
debugf(NHRP_DEBUG_KERNEL, "Netlink: update %s dev %s nud %x",
- sockunion2str(&addr, buf, sizeof buf), ifp->name,
+ sockunion2str(&addr, buf, sizeof(buf)), ifp->name,
ndm->ndm_state);
state = (msg->nlmsg_type == RTM_NEWNEIGH) ? ndm->ndm_state
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c
index cc18b36f6..81f7d9942 100644
--- a/nhrpd/nhrp_cache.c
+++ b/nhrpd/nhrp_cache.c
@@ -210,7 +210,7 @@ static void nhrp_cache_authorize_binding(struct nhrp_reqid *r, void *arg)
char buf[SU_ADDRSTRLEN];
debugf(NHRP_DEBUG_COMMON, "cache: %s %s: %s", c->ifp->name,
- sockunion2str(&c->remote_addr, buf, sizeof buf),
+ sockunion2str(&c->remote_addr, buf, sizeof(buf)),
(const char *)arg);
nhrp_reqid_free(&nhrp_event_reqid, r);
@@ -301,7 +301,7 @@ int nhrp_cache_update_binding(struct nhrp_cache *c, enum nhrp_cache_type type,
c->cur.remote_nbma_natoa = *nbma_oa;
else
memset(&c->cur.remote_nbma_natoa, 0,
- sizeof c->cur.remote_nbma_natoa);
+ sizeof(c->cur.remote_nbma_natoa));
nhrp_peer_unref(p);
} else {
c->new.type = type;
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c
index 7cf8dfbde..1e576fc5a 100644
--- a/nhrpd/nhrp_interface.c
+++ b/nhrpd/nhrp_interface.c
@@ -112,7 +112,7 @@ static void nhrp_interface_interface_notifier(struct notifier_block *n,
NOTIFY_INTERFACE_NBMA_CHANGED);
debugf(NHRP_DEBUG_IF, "%s: NBMA change: address %s",
nifp->ifp->name,
- sockunion2str(&nifp->nbma, buf, sizeof buf));
+ sockunion2str(&nifp->nbma, buf, sizeof(buf)));
break;
}
}
@@ -221,7 +221,7 @@ static void nhrp_interface_update_address(struct interface *ifp, afi_t afi,
if (best && if_ad->configured
&& best->address->prefixlen != 8 * prefix_blen(best->address)) {
zlog_notice("%s: %s is not a host prefix", ifp->name,
- prefix2str(best->address, buf, sizeof buf));
+ prefix2str(best->address, buf, sizeof(buf)));
best = NULL;
}
@@ -243,7 +243,7 @@ static void nhrp_interface_update_address(struct interface *ifp, afi_t afi,
debugf(NHRP_DEBUG_KERNEL, "%s: IPv%d address changed to %s", ifp->name,
afi == AFI_IP ? 4 : 6,
- best ? prefix2str(best->address, buf, sizeof buf) : "(none)");
+ best ? prefix2str(best->address, buf, sizeof(buf)) : "(none)");
if_ad->addr = addr;
if (if_ad->configured && sockunion_family(&if_ad->addr) != AF_UNSPEC) {
@@ -342,7 +342,7 @@ int nhrp_interface_address_add(ZAPI_CALLBACK_ARGS)
return 0;
debugf(NHRP_DEBUG_IF, "if-addr-add: %s: %s", ifc->ifp->name,
- prefix2str(ifc->address, buf, sizeof buf));
+ prefix2str(ifc->address, buf, sizeof(buf)));
nhrp_interface_update_address(
ifc->ifp, family2afi(PREFIX_FAMILY(ifc->address)), 0);
@@ -360,7 +360,7 @@ int nhrp_interface_address_delete(ZAPI_CALLBACK_ARGS)
return 0;
debugf(NHRP_DEBUG_IF, "if-addr-del: %s: %s", ifc->ifp->name,
- prefix2str(ifc->address, buf, sizeof buf));
+ prefix2str(ifc->address, buf, sizeof(buf)));
nhrp_interface_update_address(
ifc->ifp, family2afi(PREFIX_FAMILY(ifc->address)), 0);
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index bec6c014a..8509cedce 100644
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -136,7 +136,7 @@ static void nhrp_reg_peer_notify(struct notifier_block *n, unsigned long cmd)
case NOTIFY_PEER_MTU_CHANGED:
debugf(NHRP_DEBUG_COMMON, "NHS: Flush timer for %s",
sockunion2str(&r->peer->vc->remote.nbma, buf,
- sizeof buf));
+ sizeof(buf)));
THREAD_TIMER_OFF(r->t_register);
thread_add_timer_msec(master, nhrp_reg_send_req, r, 10,
&r->t_register);
@@ -162,7 +162,7 @@ static int nhrp_reg_send_req(struct thread *t)
if (!nhrp_peer_check(r->peer, 2)) {
debugf(NHRP_DEBUG_COMMON, "NHS: Waiting link for %s",
sockunion2str(&r->peer->vc->remote.nbma, buf1,
- sizeof buf1));
+ sizeof(buf1)));
thread_add_timer(master, nhrp_reg_send_req, r, 120,
&r->t_register);
return 0;
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index 2d6c26358..5ca477fb5 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -305,8 +305,8 @@ void nhrp_peer_send(struct nhrp_peer *p, struct zbuf *zb)
return;
debugf(NHRP_DEBUG_KERNEL, "PACKET: Send %s -> %s",
- sockunion2str(&p->vc->local.nbma, buf[0], sizeof buf[0]),
- sockunion2str(&p->vc->remote.nbma, buf[1], sizeof buf[1]));
+ sockunion2str(&p->vc->local.nbma, buf[0], sizeof(buf[0])),
+ sockunion2str(&p->vc->remote.nbma, buf[1], sizeof(buf[1])));
os_sendmsg(zb->head, zbuf_used(zb), p->ifp->ifindex,
sockunion_get_addr(&p->vc->remote.nbma),
@@ -584,15 +584,15 @@ void nhrp_peer_send_indication(struct interface *ifp, uint16_t protocol_type,
debugf(NHRP_DEBUG_COMMON,
"Send Traffic Indication to %s about packet to %s ignored",
sockunion2str(&p->vc->remote.nbma, buf[0],
- sizeof buf[0]),
- sockunion2str(&dst, buf[1], sizeof buf[1]));
+ sizeof(buf[0])),
+ sockunion2str(&dst, buf[1], sizeof(buf[1])));
return;
}
debugf(NHRP_DEBUG_COMMON,
"Send Traffic Indication to %s (online=%d) about packet to %s",
- sockunion2str(&p->vc->remote.nbma, buf[0], sizeof buf[0]),
- p->online, sockunion2str(&dst, buf[1], sizeof buf[1]));
+ sockunion2str(&p->vc->remote.nbma, buf[0], sizeof(buf[0])),
+ p->online, sockunion2str(&dst, buf[1], sizeof(buf[1])));
/* Create reply */
zb = zbuf_alloc(1500);
@@ -622,8 +622,8 @@ static void nhrp_handle_error_ind(struct nhrp_packet_parser *pp)
debugf(NHRP_DEBUG_COMMON,
"Error Indication from %s about packet to %s ignored",
- sockunion2str(&pp->src_proto, buf[0], sizeof buf[0]),
- sockunion2str(&dst_proto, buf[1], sizeof buf[1]));
+ sockunion2str(&pp->src_proto, buf[0], sizeof(buf[0])),
+ sockunion2str(&dst_proto, buf[1], sizeof(buf[1])));
reqid = nhrp_reqid_lookup(&nhrp_packet_reqid, htonl(hdr->u.request_id));
if (reqid)
@@ -641,8 +641,8 @@ static void nhrp_handle_traffic_ind(struct nhrp_packet_parser *p)
debugf(NHRP_DEBUG_COMMON,
"Traffic Indication from %s about packet to %s: %s",
- sockunion2str(&p->src_proto, buf[0], sizeof buf[0]),
- sockunion2str(&dst, buf[1], sizeof buf[1]),
+ sockunion2str(&p->src_proto, buf[0], sizeof(buf[0])),
+ sockunion2str(&dst, buf[1], sizeof(buf[1])),
(p->if_ad->flags & NHRP_IFF_SHORTCUT) ? "trying shortcut"
: "ignored");
@@ -809,8 +809,8 @@ static void nhrp_packet_debug(struct zbuf *zb, const char *dir)
zbuf_init(&zhdr, zb->buf, zb->tail - zb->buf, zb->tail - zb->buf);
hdr = nhrp_packet_pull(&zhdr, &src_nbma, &src_proto, &dst_proto);
- sockunion2str(&src_proto, buf[0], sizeof buf[0]);
- sockunion2str(&dst_proto, buf[1], sizeof buf[1]);
+ sockunion2str(&src_proto, buf[0], sizeof(buf[0]));
+ sockunion2str(&dst_proto, buf[1], sizeof(buf[1]));
reply = packet_types[hdr->type].type == PACKET_REPLY;
debugf(NHRP_DEBUG_COMMON, "%s %s(%d) %s -> %s", dir,
@@ -852,8 +852,8 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
afi_t nbma_afi, proto_afi;
debugf(NHRP_DEBUG_KERNEL, "PACKET: Recv %s -> %s",
- sockunion2str(&vc->remote.nbma, buf[0], sizeof buf[0]),
- sockunion2str(&vc->local.nbma, buf[1], sizeof buf[1]));
+ sockunion2str(&vc->remote.nbma, buf[0], sizeof(buf[0])),
+ sockunion2str(&vc->local.nbma, buf[1], sizeof(buf[1])));
if (!p->online) {
info = "peer not online";
@@ -885,7 +885,7 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
|| htons(hdr->packet_size) > realsize) {
zlog_info(
"From %s: error: packet type %d, version %d, AFI %d, proto %x, size %d (real size %d)",
- sockunion2str(&vc->remote.nbma, buf[0], sizeof buf[0]),
+ sockunion2str(&vc->remote.nbma, buf[0], sizeof(buf[0])),
(int)hdr->type, (int)hdr->version, (int)nbma_afi,
(int)htons(hdr->protocol_type),
(int)htons(hdr->packet_size), (int)realsize);
@@ -962,7 +962,7 @@ drop:
if (info) {
zlog_info(
"From %s: error: %s",
- sockunion2str(&vc->remote.nbma, buf[0], sizeof buf[0]),
+ sockunion2str(&vc->remote.nbma, buf[0], sizeof(buf[0])),
info);
}
if (peer)
diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c
index ddb69a1ac..4f961c0da 100644
--- a/nhrpd/nhrp_route.c
+++ b/nhrpd/nhrp_route.c
@@ -224,8 +224,8 @@ int nhrp_route_read(ZAPI_CALLBACK_ARGS)
added = (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD);
debugf(NHRP_DEBUG_ROUTE, "if-route-%s: %s via %s dev %s",
added ? "add" : "del",
- prefix2str(&api.prefix, buf[0], sizeof buf[0]),
- sockunion2str(&nexthop_addr, buf[1], sizeof buf[1]),
+ prefix2str(&api.prefix, buf[0], sizeof(buf[0])),
+ sockunion2str(&nexthop_addr, buf[1], sizeof(buf[1])),
ifp ? ifp->name : "(none)");
nhrp_route_update_zebra(&api.prefix, &nexthop_addr, ifp);
@@ -252,7 +252,7 @@ int nhrp_route_get_nexthop(const union sockunion *addr, struct prefix *p,
ri = rn->info;
if (ri->nhrp_ifp) {
debugf(NHRP_DEBUG_ROUTE, "lookup %s: nhrp_if=%s",
- prefix2str(&lookup, buf, sizeof buf),
+ prefix2str(&lookup, buf, sizeof(buf)),
ri->nhrp_ifp->name);
if (via)
@@ -261,7 +261,7 @@ int nhrp_route_get_nexthop(const union sockunion *addr, struct prefix *p,
*ifp = ri->nhrp_ifp;
} else {
debugf(NHRP_DEBUG_ROUTE, "lookup %s: zebra route dev %s",
- prefix2str(&lookup, buf, sizeof buf),
+ prefix2str(&lookup, buf, sizeof(buf)),
ri->ifp ? ri->ifp->name : "(none)");
if (via)
diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c
index b3fdecf0e..2552f9fd1 100644
--- a/nhrpd/nhrp_shortcut.c
+++ b/nhrpd/nhrp_shortcut.c
@@ -32,7 +32,7 @@ static void nhrp_shortcut_check_use(struct nhrp_shortcut *s)
if (s->expiring && s->cache && s->cache->used) {
debugf(NHRP_DEBUG_ROUTE, "Shortcut %s used and expiring",
- prefix2str(s->p, buf, sizeof buf));
+ prefix2str(s->p, buf, sizeof(buf)));
nhrp_shortcut_send_resolution_req(s);
}
}
@@ -133,7 +133,7 @@ static void nhrp_shortcut_delete(struct nhrp_shortcut *s)
nhrp_reqid_free(&nhrp_packet_reqid, &s->reqid);
debugf(NHRP_DEBUG_ROUTE, "Shortcut %s purged",
- prefix2str(s->p, buf, sizeof buf));
+ prefix2str(s->p, buf, sizeof(buf)));
nhrp_shortcut_update_binding(s, NHRP_CACHE_INVALID, NULL, 0);
@@ -172,7 +172,7 @@ static struct nhrp_shortcut *nhrp_shortcut_get(struct prefix *p)
s->p = &rn->p;
debugf(NHRP_DEBUG_ROUTE, "Shortcut %s created",
- prefix2str(s->p, buf, sizeof buf));
+ prefix2str(s->p, buf, sizeof(buf)));
} else {
s = rn->info;
route_unlock_node(rn);
@@ -217,7 +217,7 @@ static void nhrp_shortcut_recv_resolution_rep(struct nhrp_reqid *reqid,
}
/* Parse extensions */
- memset(&nat_nbma, 0, sizeof nat_nbma);
+ memset(&nat_nbma, 0, sizeof(nat_nbma));
while ((ext = nhrp_ext_pull(&pp->extensions, &extpl)) != NULL) {
switch (htons(ext->type) & ~NHRP_EXTENSION_FLAG_COMPULSORY) {
case NHRP_EXTENSION_NAT_ADDRESS:
@@ -231,8 +231,8 @@ static void nhrp_shortcut_recv_resolution_rep(struct nhrp_reqid *reqid,
if (!sockunion_same(&cie_proto, &pp->dst_proto)) {
debugf(NHRP_DEBUG_COMMON,
"Shortcut: Warning dst_proto altered from %s to %s",
- sockunion2str(&cie_proto, buf[0], sizeof buf[0]),
- sockunion2str(&pp->dst_proto, buf[1], sizeof buf[1]));
+ sockunion2str(&cie_proto, buf[0], sizeof(buf[0])),
+ sockunion2str(&pp->dst_proto, buf[1], sizeof(buf[1])));
}
/* One or more CIEs should be given as reply, we support only one */
@@ -263,10 +263,10 @@ static void nhrp_shortcut_recv_resolution_rep(struct nhrp_reqid *reqid,
debugf(NHRP_DEBUG_COMMON,
"Shortcut: %s is at proto %s cie-nbma %s nat-nbma %s cie-holdtime %d",
- prefix2str(&prefix, bufp, sizeof bufp),
- sockunion2str(proto, buf[0], sizeof buf[0]),
- sockunion2str(&cie_nbma, buf[1], sizeof buf[1]),
- sockunion2str(&nat_nbma, buf[2], sizeof buf[2]),
+ prefix2str(&prefix, bufp, sizeof(bufp)),
+ sockunion2str(proto, buf[0], sizeof(buf[0])),
+ sockunion2str(&cie_nbma, buf[1], sizeof(buf[1])),
+ sockunion2str(&nat_nbma, buf[2], sizeof(buf[2])),
htons(cie->holding_time));
/* Update cache entry for the protocol to nbma binding */
diff --git a/nhrpd/nhrp_vc.c b/nhrpd/nhrp_vc.c
index 605aa34ff..6567b231a 100644
--- a/nhrpd/nhrp_vc.c
+++ b/nhrpd/nhrp_vc.c
@@ -142,8 +142,8 @@ int nhrp_vc_ipsec_updown(uint32_t child_id, struct nhrp_vc *vc)
sa->vc->abort_migration = 0;
debugf(NHRP_DEBUG_COMMON, "IPsec NBMA change of %s to %s",
sockunion2str(&sa->vc->remote.nbma, buf[0],
- sizeof buf[0]),
- sockunion2str(&vc->remote.nbma, buf[1], sizeof buf[1]));
+ sizeof(buf[0])),
+ sockunion2str(&vc->remote.nbma, buf[1], sizeof(buf[1])));
nhrp_vc_update(sa->vc, NOTIFY_VC_IPSEC_UPDATE_NBMA);
abort_migration = sa->vc->abort_migration;
}
diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c
index 8438f3cb4..f6d18fb77 100644
--- a/nhrpd/nhrp_vty.c
+++ b/nhrpd/nhrp_vty.c
@@ -613,9 +613,9 @@ static void show_ip_nhrp_cache(struct nhrp_cache *c, void *pctx)
vty_out(ctx->vty, "%-8s %-8s %-24s %-24s %c%c%c %s\n", c->ifp->name,
nhrp_cache_type_str[c->cur.type],
- sockunion2str(&c->remote_addr, buf[0], sizeof buf[0]),
+ sockunion2str(&c->remote_addr, buf[0], sizeof(buf[0])),
c->cur.peer ? sockunion2str(&c->cur.peer->vc->remote.nbma,
- buf[1], sizeof buf[1])
+ buf[1], sizeof(buf[1]))
: "-",
c->used ? 'U' : ' ', c->t_timeout ? 'T' : ' ',
c->t_auth ? 'A' : ' ',
@@ -637,10 +637,10 @@ static void show_ip_nhrp_nhs(struct nhrp_nhs *n, struct nhrp_registration *reg,
vty_out(vty, "%-8s %-24s %-16s %-16s\n", n->ifp->name, n->nbma_fqdn,
(reg && reg->peer) ? sockunion2str(&reg->peer->vc->remote.nbma,
- buf[0], sizeof buf[0])
+ buf[0], sizeof(buf[0]))
: "-",
sockunion2str(reg ? &reg->proto_addr : &n->proto_addr, buf[1],
- sizeof buf[1]));
+ sizeof(buf[1])));
}
static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)
@@ -658,8 +658,8 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)
c = s->cache;
vty_out(ctx->vty, "%-8s %-24s %-24s %s\n", nhrp_cache_type_str[s->type],
- prefix2str(s->p, buf1, sizeof buf1),
- c ? sockunion2str(&c->remote_addr, buf2, sizeof buf2) : "",
+ prefix2str(s->p, buf1, sizeof(buf1)),
+ c ? sockunion2str(&c->remote_addr, buf2, sizeof(buf2)) : "",
(c && c->cur.peer) ? c->cur.peer->vc->remote.id : "");
}
@@ -678,19 +678,19 @@ static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)
nhrp_cache_type_str[c->cur.type],
(c->cur.peer && c->cur.peer->online) ? " up" : "",
c->used ? " used" : "",
- sockunion2str(&c->remote_addr, buf, sizeof buf),
+ sockunion2str(&c->remote_addr, buf, sizeof(buf)),
8 * family2addrsize(sockunion_family(&c->remote_addr)));
if (c->cur.peer) {
vty_out(ctx->vty, "NBMA-Address: %s\n",
sockunion2str(&c->cur.peer->vc->remote.nbma, buf,
- sizeof buf));
+ sizeof(buf)));
}
if (sockunion_family(&c->cur.remote_nbma_natoa) != AF_UNSPEC) {
vty_out(ctx->vty, "NBMA-NAT-OA-Address: %s\n",
sockunion2str(&c->cur.remote_nbma_natoa, buf,
- sizeof buf));
+ sizeof(buf)));
}
vty_out(ctx->vty, "\n\n");
@@ -741,8 +741,8 @@ static void show_dmvpn_entry(struct nhrp_vc *vc, void *ctx)
char buf[2][SU_ADDRSTRLEN];
vty_out(vty, "%-24s %-24s %c %-4d %-24s\n",
- sockunion2str(&vc->local.nbma, buf[0], sizeof buf[0]),
- sockunion2str(&vc->remote.nbma, buf[1], sizeof buf[1]),
+ sockunion2str(&vc->local.nbma, buf[0], sizeof(buf[0])),
+ sockunion2str(&vc->remote.nbma, buf[1], sizeof(buf[1])),
notifier_active(&vc->notifier_list) ? 'n' : ' ', vc->ipsec,
vc->remote.id);
}
@@ -824,11 +824,11 @@ static void interface_config_write_nhrp_map(struct nhrp_cache *c, void *data)
return;
vty_out(vty, " %s nhrp map %s %s\n", ctx->aficmd,
- sockunion2str(&c->remote_addr, buf[0], sizeof buf[0]),
+ sockunion2str(&c->remote_addr, buf[0], sizeof(buf[0])),
c->cur.type == NHRP_CACHE_LOCAL
? "local"
: sockunion2str(&c->cur.peer->vc->remote.nbma, buf[1],
- sizeof buf[1]));
+ sizeof(buf[1])));
}
static int interface_config_write(struct vty *vty)
@@ -904,7 +904,7 @@ static int interface_config_write(struct vty *vty)
? "dynamic"
: sockunion2str(
&nhs->proto_addr, buf,
- sizeof buf),
+ sizeof(buf)),
nhs->nbma_fqdn);
}
}
diff --git a/nhrpd/vici.c b/nhrpd/vici.c
index 4f12d796a..2dc05a4aa 100644
--- a/nhrpd/vici.c
+++ b/nhrpd/vici.c
@@ -303,7 +303,7 @@ static void vici_recv_sa(struct vici_conn *vici, struct zbuf *msg, int event)
if (ctx.kill_ikesa && ctx.ike_uniqueid) {
debugf(NHRP_DEBUG_COMMON, "VICI: Deleting IKE_SA %u",
ctx.ike_uniqueid);
- snprintf(buf, sizeof buf, "%u", ctx.ike_uniqueid);
+ snprintf(buf, sizeof(buf), "%u", ctx.ike_uniqueid);
vici_submit_request(vici, "terminate", VICI_KEY_VALUE, "ike-id",
strlen(buf), buf, VICI_END);
}
@@ -527,8 +527,8 @@ void vici_request_vc(const char *profile, union sockunion *src,
struct vici_conn *vici = &vici_connection;
char buf[2][SU_ADDRSTRLEN];
- sockunion2str(src, buf[0], sizeof buf[0]);
- sockunion2str(dst, buf[1], sizeof buf[1]);
+ sockunion2str(src, buf[0], sizeof(buf[0]));
+ sockunion2str(dst, buf[1], sizeof(buf[1]));
vici_submit_request(vici, "initiate", VICI_KEY_VALUE, "child",
strlen(profile), profile, VICI_KEY_VALUE, "timeout",