diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-23 16:05:38 -1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-23 19:33:39 -0800 |
commit | a9786564c23fbf032f47096f543699c8c402785b (patch) | |
tree | 551231e54e017c9e83fd44da59edbe4c94dfa716 /file.c | |
parent | 10ce60e2120419282ff7694e8deda60e94832aa1 (diff) | |
download | subsurface-a9786564c23fbf032f47096f543699c8c402785b.tar.gz |
Allocate dive samples separately from 'struct dive'
We used to avoid some extra allocations by just allocating the dive
samples as part of the 'struct dive' allocation itself, but that ends up
complicating things, and will make it impossible to have multiple
different sets of samples (for multiple dive computers).
So stop doing it. Just allocate the dive samples array separately.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -204,7 +204,7 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_ if (errno) break; - sample = prepare_sample(&dive); + sample = prepare_sample(dive); sample->time.seconds = time; add_sample_data(sample, type, val); finish_sample(dive); |