From: David Lamparter Date: Tue, 21 Apr 2015 08:13:07 +0000 (+0200) Subject: *: fix more initialisers (for BSD) X-Git-Tag: frr-2.0-rc1~567 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9b6710b406ff7ba6e6b6d356a678edb746066424;p=mirror%2Ffrr.git *: fix more initialisers (for BSD) FreeBSD and NetBSD spew a few more warnings about variable initialisers. Found with OSR's/NetDEF's fancy new CI system. Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index d32c79d204..11b6919bf2 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -240,8 +240,8 @@ route_match_peer (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { union sockunion *su; - union sockunion su_def = { .sin.sin_family = AF_INET, - .sin.sin_addr.s_addr = INADDR_ANY }; + union sockunion su_def = { .sin = { .sin_family = AF_INET, + .sin_addr.s_addr = INADDR_ANY } }; struct peer_group *group; struct peer *peer; struct listnode *node, *nnode; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index e026d4748e..277adce33e 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -1319,7 +1319,7 @@ ripng_read (struct thread *thread) int sock; struct sockaddr_in6 from; struct ripng_packet *packet; - unsigned int ifindex; + unsigned int ifindex = 0; struct interface *ifp; int hoplimit = -1; diff --git a/zebra/ioctl.c b/zebra/ioctl.c index 24df98557d..f91ee2438d 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -52,7 +52,7 @@ if_ioctl (u_long request, caddr_t buffer) { int sock; int ret; - int err; + int err = 0; if (zserv_privs.change(ZPRIVS_RAISE)) zlog (NULL, LOG_ERR, "Can't raise privileges"); @@ -85,7 +85,7 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer) { int sock; int ret; - int err; + int err = 0; if (zserv_privs.change(ZPRIVS_RAISE)) zlog (NULL, LOG_ERR, "Can't raise privileges");