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>
This commit is contained in:
Linus Torvalds 2012-09-19 21:44:54 -07:00
parent dce08deb34
commit d66d376d20

View file

@ -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) {