eolian: always validate entire staging area
authorDaniel Kolesa <d.kolesa@samsung.com>
Sun, 13 May 2018 14:53:40 +0000 (16:53 +0200)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 1 Jun 2018 01:51:21 +0000 (10:51 +0900)
This is necessary even when parsing a single file because there
may be parsed results directly in the staging area introduced by
doc references, those wouldn't get correctly validated and would
be left in an inconsistent and unusable state.

src/lib/eolian/eolian_database.c

index 5f4a6ae..ddb14e3 100644 (file)
@@ -1032,7 +1032,7 @@ eolian_state_file_parse(Eolian_State *state, const char *filepath)
    if (!_parse_deferred(ret))
      return NULL;
    _merge_units(ret);
-   if (!database_validate(ret))
+   if (!database_validate(&state->staging.unit))
      return NULL;
    _merge_staging(state);
    return ret;