mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 06:42:45 +00:00
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
This commit is contained in:
parent
add2da0db1
commit
7e9803e865
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154351
@ -656,13 +656,7 @@ ncp_sysctl_connstat(SYSCTL_HANDLER_ARGS)
|
|||||||
if (error) break;
|
if (error) break;
|
||||||
/* I can't do conn_lock while list is locked */
|
/* I can't do conn_lock while list is locked */
|
||||||
ncp->nc_lwant++;
|
ncp->nc_lwant++;
|
||||||
if (!error) {
|
ncp_conn_getinfo(ncp, &ncs);
|
||||||
ncp_conn_getinfo(ncp, &ncs);
|
|
||||||
} else {
|
|
||||||
bzero(&ncs,sizeof(ncs));
|
|
||||||
ncs.connRef = ncp->nc_id;
|
|
||||||
strcpy(ncs.li.server,"***");
|
|
||||||
}
|
|
||||||
ncp->nc_lwant--;
|
ncp->nc_lwant--;
|
||||||
error = SYSCTL_OUT(req, &ncs, sizeof(ncs));
|
error = SYSCTL_OUT(req, &ncs, sizeof(ncs));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user