From daba307035faf4cc01f1ccb883b21281d91234cc Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 28 Jul 2017 14:10:07 +0200 Subject: 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 --- user_call/user_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_call/user_io.c') diff --git a/user_call/user_io.c b/user_call/user_io.c index 3c7e9d5..3bd6a26 100644 --- a/user_call/user_io.c +++ b/user_call/user_io.c @@ -163,7 +163,8 @@ int user_read(int fd, void *buf, size_t count) incoming_stream.next_in = input_buffer; incoming_stream.avail_in = 0; - if ((len = read(fd, input_buffer, BUFLEN)) <= 0) + len = read(fd, input_buffer, BUFLEN); + if (len <= 0) return len; incoming_stream.avail_in = len; -- cgit v1.2.3