aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-02 17:25:14 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-02 17:25:14 +0100
commit98ad0b490e8c5b3f32c7de0ce252266a3c24a84e (patch)
treebf1f3c8bbafa4e1d522629acca0538fd50261506 /src/mds-kbdc
parentmds-kbdc: expand tabs (diff)
downloadmds-98ad0b490e8c5b3f32c7de0ce252266a3c24a84e.tar.gz
mds-98ad0b490e8c5b3f32c7de0ce252266a3c24a84e.tar.bz2
mds-98ad0b490e8c5b3f32c7de0ce252266a3c24a84e.tar.xz
mds-kbdc: files with syntax errors are not empty
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r--src/mds-kbdc/make-tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds-kbdc/make-tree.c b/src/mds-kbdc/make-tree.c
index 14db125..a8f20ee 100644
--- a/src/mds-kbdc/make-tree.c
+++ b/src/mds-kbdc/make-tree.c
@@ -864,7 +864,8 @@ static int check_whether_file_is_empty(state_t* restrict state)
/* Warn about empty files. */
if (parsing_result->tree == NULL)
- NEW_ERROR(0, WARNING, "file is empty");
+ if (parsing_result->errors_ptr == 0)
+ NEW_ERROR(0, WARNING, "file is empty");
return 0;
pfail: