diff options
-rw-r--r-- | ax25/axspawn.c | 5 |
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') { |