From bd9cd14f18076418e7a9bfcbfbb4e4bdaa03276a Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 9 Aug 2017 21:01:11 +0200 Subject: 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 Signed-off-by: Ralf Baechle --- ax25/axspawn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ax25') 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') { -- cgit v1.2.3