mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
staging: comedi: tests: Simplify conditional evaluation
Boolean comparison of the condition inside unittest function is unnecessary and can be simplified by directly using the condition outcome for evaluation. Issue reported by : scripts/coccinelle/misc/boolinit.cocci Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/20201019171426.GA72818@ubuntu204 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a5a6e5eff4
commit
153167c521
1 changed files with 4 additions and 4 deletions
|
@ -499,13 +499,13 @@ void test_route_register_is_valid(void)
|
|||
const struct ni_route_tables *T = &private.routing_tables;
|
||||
|
||||
init_pci_fake();
|
||||
unittest(route_register_is_valid(4, O(4), T) == false,
|
||||
unittest(!route_register_is_valid(4, O(4), T),
|
||||
"check for bad source 4-->4\n");
|
||||
unittest(route_register_is_valid(0, O(1), T) == true,
|
||||
unittest(route_register_is_valid(0, O(1), T),
|
||||
"find first source\n");
|
||||
unittest(route_register_is_valid(4, O(6), T) == true,
|
||||
unittest(route_register_is_valid(4, O(6), T),
|
||||
"find middle source\n");
|
||||
unittest(route_register_is_valid(9, O(8), T) == true,
|
||||
unittest(route_register_is_valid(9, O(8), T),
|
||||
"find last source");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue