diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-05-27 18:54:58 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-05-27 18:54:58 +0000 |
commit | 6dd98d5d4e8bba8a8c9f14267ff8e26db51c00ae (patch) | |
tree | a2fda5a0831b90714d5b5645b62c984a306407d2 /sys/dev/random/yarrow.c | |
parent | 3b371f76aa73339f52b0b40a60e443acba4d4913 (diff) | |
download | FreeBSD-src-6dd98d5d4e8bba8a8c9f14267ff8e26db51c00ae.zip FreeBSD-src-6dd98d5d4e8bba8a8c9f14267ff8e26db51c00ae.tar.gz |
Rather than repeatedly setting and discarding local variable 'o' based
on the return values of various run-time sysctl additions, just ignore
the return value.
Found with: Coverity Prevent(tm)
CID: 562
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r-- | sys/dev/random/yarrow.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c index ab10b21..010de0c 100644 --- a/sys/dev/random/yarrow.c +++ b/sys/dev/random/yarrow.c @@ -104,47 +104,45 @@ void random_yarrow_init_alg(struct sysctl_ctx_list *clist, struct sysctl_oid *in_o) { int i; - struct sysctl_oid *o, *random_yarrow_o; + struct sysctl_oid *random_yarrow_o; /* Yarrow parameters. Do not adjust these unless you have * have a very good clue about what they do! */ - o = SYSCTL_ADD_NODE(clist, + random_yarrow_o = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(in_o), OID_AUTO, "yarrow", CTLFLAG_RW, 0, "Yarrow Parameters"); - random_yarrow_o = o; - - o = SYSCTL_ADD_PROC(clist, + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(random_yarrow_o), OID_AUTO, "gengateinterval", CTLTYPE_INT|CTLFLAG_RW, &random_state.gengateinterval, 10, random_check_uint_gengateinterval, "I", "Generation gate interval"); - o = SYSCTL_ADD_PROC(clist, + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(random_yarrow_o), OID_AUTO, "bins", CTLTYPE_INT|CTLFLAG_RW, &random_state.bins, 10, random_check_uint_bins, "I", "Execution time tuner"); - o = SYSCTL_ADD_PROC(clist, + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(random_yarrow_o), OID_AUTO, "fastthresh", CTLTYPE_INT|CTLFLAG_RW, &random_state.pool[0].thresh, (3*BLOCKSIZE)/4, random_check_uint_fastthresh, "I", "Fast reseed threshold"); - o = SYSCTL_ADD_PROC(clist, + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(random_yarrow_o), OID_AUTO, "slowthresh", CTLTYPE_INT|CTLFLAG_RW, &random_state.pool[1].thresh, BLOCKSIZE, random_check_uint_slowthresh, "I", "Slow reseed threshold"); - o = SYSCTL_ADD_PROC(clist, + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(random_yarrow_o), OID_AUTO, "slowoverthresh", CTLTYPE_INT|CTLFLAG_RW, &random_state.slowoverthresh, 2, |