diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-17 12:05:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-17 13:11:11 -0800 |
commit | 16f52cf23d1b47c1979fcdeef013384cd1b04ed7 (patch) | |
tree | 806ed2685267a9be1da9cc6f96d303be9dde017e /dive.c | |
parent | 6b27fb9be58a6f3f4ae98b780a8c24c2f1370f52 (diff) | |
download | subsurface-16f52cf23d1b47c1979fcdeef013384cd1b04ed7.tar.gz |
Fix ordering issue in fixup
We have this oddity in "fixup_dive()" that we fix up the dive water
temperates and durations by looking over all the dive computer data.
But we actually call that *before* we've fixed-up the dive computer data.
So the water temperature is there in the samples, but hasn't made it to
the generic dive computer water temperature yet, so then it doesn't make
it into the dive structure either.
Until the *second* time, when we have load the (partially fixed-up) data.
Acked-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -706,6 +706,9 @@ struct dive *fixup_dive(struct dive *dive) sanitize_cylinder_info(dive); dive->maxcns = dive->cns; + for_each_dc(dive, dc) + fixup_dive_dc(dive, dc); + fixup_water_salinity(dive); fixup_surface_pressure(dive); fixup_meandepth(dive); @@ -713,9 +716,6 @@ struct dive *fixup_dive(struct dive *dive) fixup_watertemp(dive); fixup_airtemp(dive); - for_each_dc(dive, dc) - fixup_dive_dc(dive, dc); - for (i = 0; i < MAX_CYLINDERS; i++) { cylinder_t *cyl = dive->cylinder + i; add_cylinder_description(&cyl->type); |