diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-07-28 14:10:07 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-07-31 04:29:44 +0200 |
commit | daba307035faf4cc01f1ccb883b21281d91234cc (patch) | |
tree | edbd5df9285303f281524fac8064866057ce35ce /user_call/ax25_call.c | |
parent | 71b0582584ac5de97141ea207ddf17f7c938b2df (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 'user_call/ax25_call.c')
-rw-r--r-- | user_call/ax25_call.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/user_call/ax25_call.c b/user_call/ax25_call.c index cbfc6cb..d818bbf 100644 --- a/user_call/ax25_call.c +++ b/user_call/ax25_call.c @@ -72,7 +72,8 @@ int main(int argc, char **argv) axconnect.fsa_ax25.sax25_family = axbind.fsa_ax25.sax25_family = AF_AX25; axbind.fsa_ax25.sax25_ndigis = 1; - if ((addr = ax25_config_get_addr(argv[optind])) == NULL) { + addr = ax25_config_get_addr(argv[optind]); + if (addr == NULL) { sprintf(buffer, "ERROR: invalid AX.25 port name - %s\r", argv[optind]); err(buffer); } @@ -95,7 +96,8 @@ int main(int argc, char **argv) /* * Open the socket into the kernel. */ - if ((s = socket(AF_AX25, SOCK_SEQPACKET, 0)) < 0) { + s = socket(AF_AX25, SOCK_SEQPACKET, 0); + if (s < 0) { sprintf(buffer, "ERROR: cannot open AX.25 socket, %s\r", strerror(errno)); err(buffer); } |