summaryrefslogtreecommitdiffstats
path: root/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-08-09 21:01:11 +0200
committerRalf Baechle <ralf@linux-mips.org>2019-03-28 23:45:46 +0100
commitbd9cd14f18076418e7a9bfcbfbb4e4bdaa03276a (patch)
tree9f8defa4c767fa7dd6a941420597a16a32adf057 /ax25
parent8788cecf644192d0d5bf9066767b8ad28690bb3a (diff)
axspawn: Fix transformation by bad cleanup
6afad7276402 ("Delete more assignments in if conditions.") has a manual edit and that promptly went wrong. Fixes: 6afad7276402 ("Delete more assignments in if conditions.") Reported-by: Thomas Osterried <ax25@x-berg.in-berlin.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25')
-rw-r--r--ax25/axspawn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ax25/axspawn.c b/ax25/axspawn.c
index dd234f0..4c728c4 100644
--- a/ax25/axspawn.c
+++ b/ax25/axspawn.c
@@ -1275,9 +1275,8 @@ static void read_config(void)
{
fgets(buf, sizeof(buf), fp);
p = strchr(buf, '#');
- if (!p)
- p = strchr(buf, '\n');
- *p='\0';
+ if (p || (p = strchr(buf, '\n')))
+ *p='\0';
if (buf[0] != '\0')
{