Readability fix: if statement assignments
Coccinelle-assisted:
@@
variable i;
expression E;
statement S1, S2;
@@
+ i = E;
if (
(
- (i = E)
+ i
!= ...
|
- (i = E)
+ i
== ...
|
- (i = E)
+ i
< ...
|
- (i = E)
+ i
> ...
|
- (i = E)
+ i
<= ...
|
- (i = E)
+ i
>= ...
|
- (i = E)
+ i
)
) S1 else S2
spatch --sp-file if_assignment.cocci --in-place --dir .
find * | grep "\.[ch]" | xargs clang-format --style=file -i
Test: Compiles
Change-Id: Ifb9cde410ed84e0ab8012432ad0ec30df17d1786
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
43 files changed