coredump: fix handling of premature-eof data for --backtrace

We'd fail with an assert in journal_importer_process_data(),
because that function requires the caller to handle EOF themselves.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-03-05 10:35:44 -05:00
parent bf1c790c8f
commit d74dc4f2d0
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ int journal_importer_process_data(JournalImporter *imp) {
return r;
if (r == 0) {
imp->state = IMPORTER_STATE_EOF;
return r;
return 0;
}
assert(n > 0);
assert(line[n-1] == '\n');