diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 15:55:18 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 15:56:34 -0800 |
commit | 27d51ce1d7a5e1f729f069078fade51e126db15f (patch) | |
tree | 884b9b27b96d069e7322cdad6f7443fcae639e52 /divelist.c | |
parent | b696c61389680b9ccf2582a445c9fd7a7e1da360 (diff) | |
download | subsurface-27d51ce1d7a5e1f729f069078fade51e126db15f.tar.gz |
Fix potential uninitialized variable access
There are paths through this function that reach the comparison at the end
of it without trip_a and/or trip_b being initialized.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c index 8b86c5343..245ff4499 100644 --- a/divelist.c +++ b/divelist.c @@ -1472,7 +1472,7 @@ static gint dive_nr_sort(GtkTreeModel *model, int idx_a, idx_b; timestamp_t when_a, when_b; struct dive *a, *b; - dive_trip_t *tripa,*tripb; + dive_trip_t *tripa = NULL, *tripb = NULL; gtk_tree_model_get(model, iter_a, DIVE_INDEX, &idx_a, DIVE_DATE, &when_a, -1); gtk_tree_model_get(model, iter_b, DIVE_INDEX, &idx_b, DIVE_DATE, &when_b, -1); |