summaryrefslogtreecommitdiffstats
path: root/kiss/kissparms.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-28 14:10:07 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-07-31 04:29:44 +0200
commitdaba307035faf4cc01f1ccb883b21281d91234cc (patch)
treeedbd5df9285303f281524fac8064866057ce35ce /kiss/kissparms.c
parent71b0582584ac5de97141ea207ddf17f7c938b2df (diff)
treewide: Kill assignments in if conditions.
Somewhat hard to read and the code base already has many overlong lines. Found with below spatch file and some manual editing in ax25/access.c to restore a comment lost by spatch. @parens@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'kiss/kissparms.c')
-rw-r--r--kiss/kissparms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kiss/kissparms.c b/kiss/kissparms.c
index def7b59..7834162 100644
--- a/kiss/kissparms.c
+++ b/kiss/kissparms.c
@@ -153,7 +153,8 @@ int main(int argc, char *argv[])
return 1;
}
- if ((s = socket(PF_PACKET, SOCK_PACKET, htons(proto))) < 0) {
+ s = socket(PF_PACKET, SOCK_PACKET, htons(proto));
+ if (s < 0) {
perror("kissparms: socket");
return 1;
}