summaryrefslogtreecommitdiffstats
path: root/yamdrv
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 /yamdrv
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 'yamdrv')
-rw-r--r--yamdrv/yamcfg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/yamdrv/yamcfg.c b/yamdrv/yamcfg.c
index b14d6ff..7efb55a 100644
--- a/yamdrv/yamcfg.c
+++ b/yamdrv/yamcfg.c
@@ -320,7 +320,8 @@ int main (int argc, char *argv[])
strcpy (name, argv[1]);
- if ((sock = socket (PF_INET, SOCK_PACKET, htons (ETH_P_AX25))) < 0)
+ sock = socket(PF_INET, SOCK_PACKET, htons(ETH_P_AX25));
+ if (sock < 0)
{
fprintf (stderr, "%s: Error %s (%i), cannot open %s\n",
argv[0], strerror (errno), errno, name);