Repository navigation
Commit c65a965
via-ircc: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
Verified by compilation only.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 8db4ec6 commit c65a965
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | 513 | | |
516 | | - | |
| 514 | + | |
517 | 515 | | |
518 | 516 | | |
519 | 517 | | |
| |||
926 | 924 | | |
927 | 925 | | |
928 | 926 | | |
929 | | - | |
930 | 927 | | |
931 | 928 | | |
932 | 929 | | |
| |||
983 | 980 | | |
984 | 981 | | |
985 | 982 | | |
986 | | - | |
| 983 | + | |
987 | 984 | | |
988 | 985 | | |
989 | 986 | | |
| |||
0 commit comments