diff options
author | Frank Rowand <frank.rowand@sony.com> | 2018-03-09 01:39:04 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-03-12 18:27:48 +0300 |
commit | 06c4697894992b0977f1f4f079ba50da5eccf76a (patch) | |
tree | 570ed4b5b3f6b399024ca50e5fba623581725123 /crypto/jitterentropy-kcapi.c | |
parent | 2a38f6da6014f1e1922361370dbe9a15a828386e (diff) | |
download | linux-06c4697894992b0977f1f4f079ba50da5eccf76a.tar.xz |
of: unittest: remove unneeded local return value variables
A common pattern in many unittest functions is to save the return
value of a function in a local variable, then test the value of
the local variable, without using that return value for any further
purpose. Remove the local return value variable for these cases.
A second common pattern is:
ret = some_test_function(many, parameters, ...);
if (unittest(ret == 0, "error message format", ...))
return;
This pattern is more clear when the local variable 'ret' is used, due
to the long lines caused by the parameters to the test function and
the long format and data parameters of unittest(). The local
variable is retained in these cases.
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'crypto/jitterentropy-kcapi.c')
0 files changed, 0 insertions, 0 deletions