diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-10-01 20:45:51 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-01 21:11:59 -0400 |
commit | 12c83b744edd9abe0b8e0f1ca7577871be95dbca (patch) | |
tree | 01ad4db954267eae5e6b27b44253ec9294d45d68 /planner.c | |
parent | 5a6aaec4906a68dac3ce6f845b939ade58be53ab (diff) | |
download | subsurface-12c83b744edd9abe0b8e0f1ca7577871be95dbca.tar.gz |
Avoid possible uninitialized memory read
This looks like possibly a false positive in the Coverity scan, but we can
always assume that the first point of the dive plan has been entered by
the user.
Coverity CID 1325285
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -540,7 +540,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool struct divedatapoint *dp = diveplan->dp; bool gaschange_after = !plan_verbatim; bool gaschange_before; - bool lastentered; + bool lastentered = true; struct divedatapoint *nextdp = NULL; plan_verbatim = prefs.verbatim_plan; |