From f90ab183d63c64fd2c35f00d65aedbaae8402740 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 20 Mar 2008 21:19:35 +0000 Subject: *: use fopen_or_warn in few more places --- networking/interface.c | 3 +-- networking/libiproute/iproute.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'networking') diff --git a/networking/interface.c b/networking/interface.c index 367d2b0..44bd8d3 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -560,9 +560,8 @@ static int if_readlist_proc(char *target) if (!target) proc_read = 1; - fh = fopen(_PATH_PROCNET_DEV, "r"); + fh = fopen_or_warn(_PATH_PROCNET_DEV, "r"); if (!fh) { - bb_perror_msg("warning: cannot open %s, limiting output", _PATH_PROCNET_DEV); return if_readconf(); } fgets(buf, sizeof buf, fh); /* eat line */ diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 5ded99b..670f188 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -91,7 +91,6 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, int host_len = -1; SPRINT_BUF(b1); - if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) { fprintf(stderr, "Not a route: %08x %08x %08x\n", n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); -- cgit v1.1