summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-04-01 14:44:40 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-04-01 14:44:40 +0200
commiteb8bd1e754ae5df157a09791e10e3796dbce00dc (patch)
treed24e900b3c946c912f680ccf7d1c753a1f9c6bb0 /config.h
parentab626eecd36217d15f9bee3e7e82100ca93c16d1 (diff)
downloadvdr-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.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/config.h b/config.h
index 1bc8a535..6c21fb2f 100644
--- a/config.h
+++ b/config.h
@@ -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);