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 --- ax25ipd/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ax25ipd/io.c') diff --git a/ax25ipd/io.c b/ax25ipd/io.c index 56ef30f..c0db51d 100644 --- a/ax25ipd/io.c +++ b/ax25ipd/io.c @@ -323,7 +323,8 @@ void io_open(void) if (i_am_unix98_pty_master) { /* get name of pts-device */ - if ((namepts = ptsname(ttyfd)) == NULL) { + namepts = ptsname(ttyfd); + if (namepts == NULL) { perror("Cannot get name of pts-device."); exit(1); } -- cgit v1.2.3