From d08f3360f435f17590416857a95fa9ccfe19204c Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 28 Jul 2017 14:26:57 +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 files: @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 --- ax25rtd/listener.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ax25rtd/listener.c') diff --git a/ax25rtd/listener.c b/ax25rtd/listener.c index 8a4ecf9..9ecb3c6 100644 --- a/ax25rtd/listener.c +++ b/ax25rtd/listener.c @@ -395,7 +395,8 @@ void ax25_receive(int sock) socklen_t asize; asize = sizeof(sa); - if ((size = recvfrom(sock, buf, sizeof(buf), 0, &sa, &asize)) < 0) { + size = recvfrom(sock, buf, sizeof(buf), 0, &sa, &asize); + if (size < 0) { perror("recvfrom"); save_cache(); daemon_shutdown(1); -- cgit v1.2.3