From ae9eebcaeb68cae4f2e4ae6cc689b505c9814591 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 28 Aug 2018 10:59:02 +0200 Subject: *: fix some solaris warnings Signed-off-by: David Lamparter --- zebra/if_ioctl_solaris.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'zebra/if_ioctl_solaris.c') diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c index 5a58fe175..7ec73ea11 100644 --- a/zebra/if_ioctl_solaris.c +++ b/zebra/if_ioctl_solaris.c @@ -39,6 +39,7 @@ #include "zebra/interface.h" #include "zebra/ioctl_solaris.h" #include "zebra/rib.h" +#include "zebra/rt.h" static int if_get_addr(struct interface *, struct sockaddr *, const char *); static void interface_info_ioctl(struct interface *); @@ -55,7 +56,6 @@ static int interface_list_ioctl(int af) struct lifconf lifconf; struct interface *ifp; int n; - int save_errno; size_t needed, lastneeded = 0; char *buf = NULL; @@ -76,13 +76,11 @@ calculate_lifc_len: lifn.lifn_flags = LIFC_NOXMIT; /* we want NOXMIT interfaces too */ ret = ioctl(sock, SIOCGLIFNUM, &lifn); - save_errno = errno; - } if (ret < 0) { zlog_warn("interface_list_ioctl: SIOCGLIFNUM failed %s", - safe_strerror(save_errno)); + safe_strerror(errno)); close(sock); return -1; } -- cgit v1.2.3