1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix: non-trivial designated initializers not supported

This commit is contained in:
Steffen Vogel 2019-04-23 09:57:43 +02:00
parent 12a232f334
commit 8487fa1c29

View file

@ -306,13 +306,15 @@ int file_start(struct node *n)
if (f->epoch_mode != file::epoch::ORIGINAL) {
io_rewind(&f->io);
struct sample s = { .capacity = 0 };
struct sample *smps[] = { &s };
if (io_eof(&f->io)) {
warning("Empty file");
}
else {
struct sample s;
struct sample *smps[] = { &s };
s.capacity = 0;
ret = io_scan(&f->io, smps, 1);
if (ret == 1) {
f->first = s.ts.origin;