summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-01-14 11:40:32 +0000
committerrwatson <rwatson@FreeBSD.org>2006-01-14 11:40:32 +0000
commitc3a7d3e5b2aaba4615dfe7627799169f8c59fb9a (patch)
tree461265ad7a11d94e2d6d56ac36ffe5fb00678c0a /sys/netncp
parentaedf24a684f432770f73a575208ff7f201a475cc (diff)
downloadFreeBSD-src-c3a7d3e5b2aaba4615dfe7627799169f8c59fb9a.zip
FreeBSD-src-c3a7d3e5b2aaba4615dfe7627799169f8c59fb9a.tar.gz
In ncp_sysctl_connstat(), the SLIST_FOREACH() logic to check 'error'
resulted in deadcode, as 'error' could never be 0. What this logic was originally meant to handle is not clear -- it's been this way (broken) since at least RELENG_4. Found with: Coverity Prevent(tm) MFC after: 3 days
Diffstat (limited to 'sys/netncp')
-rw-r--r--sys/netncp/ncp_conn.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c
index 270f300..1455d6f 100644
--- a/sys/netncp/ncp_conn.c
+++ b/sys/netncp/ncp_conn.c
@@ -656,13 +656,7 @@ ncp_sysctl_connstat(SYSCTL_HANDLER_ARGS)
if (error) break;
/* I can't do conn_lock while list is locked */
ncp->nc_lwant++;
- if (!error) {
- ncp_conn_getinfo(ncp, &ncs);
- } else {
- bzero(&ncs,sizeof(ncs));
- ncs.connRef = ncp->nc_id;
- strcpy(ncs.li.server,"***");
- }
+ ncp_conn_getinfo(ncp, &ncs);
ncp->nc_lwant--;
error = SYSCTL_OUT(req, &ncs, sizeof(ncs));
}
OpenPOWER on IntegriCloud