summaryrefslogtreecommitdiffstats
path: root/ax25rtd/listener.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-28 14:26:57 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-08-03 03:46:12 +0200
commitd08f3360f435f17590416857a95fa9ccfe19204c (patch)
tree0a3434ba7d43bd3d4be7081377f147da400268f1 /ax25rtd/listener.c
parentb541f5ddd8936a1f2fa69d1917d6812139da0c4e (diff)
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 <ralf@linux-mips.org>
Diffstat (limited to 'ax25rtd/listener.c')
-rw-r--r--ax25rtd/listener.c3
1 files changed, 2 insertions, 1 deletions
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);