summaryrefslogtreecommitdiffstats
path: root/ax25/axgetput/proto_bin.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-08-02 23:25:13 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-08-03 04:21:23 +0200
commit6afad7276402a90b3776ddeefb205978af42fdab (patch)
tree595886e869c364e504eacc1d472c07ae51d7bb4a /ax25/axgetput/proto_bin.c
parentca4de17280673efe76a95bf904d11e1fa75c62d4 (diff)
Delete more assignments in if conditions.
Based on below coccinelle script with a bad transformation fixed up manually. @if1@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S @if2@ expression E, F, G; binary operator X; statement S; @@ - if (G X (E = F)) + E = F; + if (E X G) S @if3@ expression E, F; statement S; @@ - if (!(E = F)) + E = F; + if (!E) S @if4@ expression E, F; statement S; @@ - if ((E = F)) + E = F; + if (E) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25/axgetput/proto_bin.c')
-rw-r--r--ax25/axgetput/proto_bin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ax25/axgetput/proto_bin.c b/ax25/axgetput/proto_bin.c
index 69d12a4..7d5eb3a 100644
--- a/ax25/axgetput/proto_bin.c
+++ b/ax25/axgetput/proto_bin.c
@@ -484,7 +484,8 @@ int bget(void) {
}
if (fdin_is_pipe && !is_stream) {
sl = stored_file;
- if (!(stored_file = stored_file->next))
+ stored_file = stored_file->next;
+ if (!stored_file)
is_eof = 1;
free(sl);
}