diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-04-01 14:44:40 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-04-01 14:44:40 +0200 |
commit | eb8bd1e754ae5df157a09791e10e3796dbce00dc (patch) | |
tree | d24e900b3c946c912f680ccf7d1c753a1f9c6bb0 /config.h | |
parent | ab626eecd36217d15f9bee3e7e82100ca93c16d1 (diff) | |
download | vdr-eb8bd1e754ae5df157a09791e10e3796dbce00dc.tar.gz vdr-eb8bd1e754ae5df157a09791e10e3796dbce00dc.tar.bz2 |
Empty lines in config files no longer cause error messages
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.43 2001/03/18 16:47:00 kls Exp $ + * $Id: config.h 1.44 2001/04/01 14:44:40 kls Exp $ */ #ifndef __CONFIG_H @@ -184,14 +184,16 @@ public: result = true; while (fgets(buffer, sizeof(buffer), f) > 0) { line++; - T *l = new T; - if (l->Parse(buffer)) - Add(l); - else { - esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line); - delete l; - result = false; - break; + if (!isempty(buffer)) { + T *l = new T; + if (l->Parse(buffer)) + Add(l); + else { + esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line); + delete l; + result = false; + break; + } } } fclose(f); |