summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-19 21:44:54 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-09-19 21:44:54 -0700
commitd66d376d204f07ccce36994c43f16365cfa1a5e5 (patch)
tree2cb744434f22f9ce7a5b3fe1058f9bc26b97361c
parentdce08deb34939eaed349d315777214c3181c1a8d (diff)
downloadsubsurface-d66d376d204f07ccce36994c43f16365cfa1a5e5.tar.gz
Fix the incorrect data type for DIVE_DATE accesses
This is the same bugfix that Lubomir did in the master branch, but now on top of the new 64-bit timestamp_t model. So now we also remove the comment about the year 2038 problem, because it's not true any more. We do all the date handling in a 64-bit integer. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--divelist.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/divelist.c b/divelist.c
index ea2dcfb5b..849a8bd2d 100644
--- a/divelist.c
+++ b/divelist.c
@@ -378,15 +378,13 @@ static void date_data_func(GtkTreeViewColumn *col,
GtkTreeIter *iter,
gpointer data)
{
- int val, idx, nr;
+ int idx, nr;
struct tm tm;
timestamp_t when;
char buffer[40];
- gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &val, -1);
+ gtk_tree_model_get(model, iter, DIVE_INDEX, &idx, DIVE_DATE, &when, -1);
nr = gtk_tree_model_iter_n_children(model, iter);
- /* 2038 problem */
- when = val;
utc_mkdate(when, &tm);
if (idx < 0) {