summaryrefslogtreecommitdiffstats
path: root/kiss/kissnetd.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-28 14:10:07 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-07-31 04:29:44 +0200
commitdaba307035faf4cc01f1ccb883b21281d91234cc (patch)
treeedbd5df9285303f281524fac8064866057ce35ce /kiss/kissnetd.c
parent71b0582584ac5de97141ea207ddf17f7c938b2df (diff)
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 <ralf@linux-mips.org>
Diffstat (limited to 'kiss/kissnetd.c')
-rw-r--r--kiss/kissnetd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kiss/kissnetd.c b/kiss/kissnetd.c
index abf9ee9..b0692df 100644
--- a/kiss/kissnetd.c
+++ b/kiss/kissnetd.c
@@ -131,7 +131,8 @@ static void ReopenPort(int PortNumber)
if (!strcmp(PortList[PortNumber]->Name, "/dev/ptmx")) {
char *npts;
/* get name of pts-device */
- if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) {
+ npts = ptsname(PortList[PortNumber]->Fd);
+ if (npts == NULL) {
sprintf(MyString, "Cannot get name of pts-device.\n");
syslog(LOG_WARNING, "kissnetd : Cannot get name of pts-device\n");
exit(1);