)
S
|
-if(E==NULL)
+if(!E)
S
)
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/net/discovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/irda/net/discovery.c
b/drivers/staging/irda/net/discovery.c
index 364d70a..1e54954 100644
--- a/drivers
On Sat, Sep 16, 2017 at 2:39 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote:
>> >
>> >
>> > On Sat, 16 Sep 2017, Srishti Sharma wrote:
>> >
>> >&g
On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> Write assignment statement outside the if statement. Done using
>> the following semantic patch by coccinelle.
>>
>> @@
>> identifier E;
>>
Parentheses are not needed on the right hand side of assignment
statement in most cases. Done using the following semantic
patch by coccinelle.
@@
identifier E,F,G,f;
expression e,r;
@@
(
E = (G == F);
|
E = (e == r);
|
E =
-(
...
-)
;
)
Signed-off-by: Srishti Sharma
---
drivers/staging/irda
Write assignment statement outside of the if statement. Done
using the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F;
+if(E)
S
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/drivers/irda-usb.c | 4 ++--
drivers/staging
This patch series intends to remove the assignment statements
inside the if statement, and eliminates the cases of parentheses
around the right hand side of assignment generated as a result of
the same.
Srishti Sharma (2):
Staging: irda: Don't use assignment inside if statement
St
Write assignment statement outside the if statement. Done using
the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F;
+if(E)
S
Signed-off-by: Srishti Sharma
---
Changes in v2:
-Semicolon was missing in one of the statements of the
On Sat, Sep 16, 2017 at 1:08 AM, Julia Lawall wrote:
>
>
> On Sat, 16 Sep 2017, Srishti Sharma wrote:
>
>> Write assignment statement outside the if statement. Done using
>> the following semantic patch by coccinelle.
>>
>> @@
>> identifier E;
>>
On Sat, Sep 16, 2017 at 1:03 AM, Srishti Sharma wrote:
> Write assignment statement outside the if statement. Done using
> the following semantic patch by coccinelle.
>
> @@
> identifier E;
> expression F;
> statement S;
> @@
>
> -if((E = F))
> +E = F
> +if
Write assignment statement outside the if statement. Done using
the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F
+if(E)
S
Signed-off-by: Srishti Sharma
---
drivers/staging/irda/drivers/irda-usb.c | 4 ++--
drivers/staging/irda
10 matches
Mail list logo