Changeset 0b2d224 in subsurface


Ignore:
Timestamp:
Dec 20, 2017, 3:04:30 PM (5 weeks ago)
Author:
Lubomir I. Ivanov <neolit123@…>
Branches:
master
Children:
22dc7b8
Parents:
3c346bb
git-author:
Berthold Stoeger <bstoeger@…> (12/19/17 14:35:57)
git-committer:
Lubomir I. Ivanov <neolit123@…> (12/20/17 15:04:30)
Message:

Fix use of uninitialized variable in core/profile.c

last_ceiling was used before initialization in the first iteration
of the loop in calculate_deco_information().

Signed-off-by: Berthold Stoeger <bstoeger@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/profile.c

    re8278be r0b2d224  
    10081008         * Set maximum number of iterations to 10 just in case */
    10091009        while ((abs(prev_deco_time - ds->deco_time) >= 30) && (count_iteration < 10)) {
    1010                 int last_ndl_tts_calc_time = 0, first_ceiling = 0, current_ceiling, last_ceiling, final_tts = 0 , time_clear_ceiling = 0;
     1010                int last_ndl_tts_calc_time = 0, first_ceiling = 0, current_ceiling, last_ceiling = 0, final_tts = 0 , time_clear_ceiling = 0;
    10111011                if (decoMode() == VPMB)
    10121012                        ds->first_ceiling_pressure.mbar = depth_to_mbar(first_ceiling, dive);
Note: See TracChangeset for help on using the changeset viewer.