From 54fcda4c32029c1afd9eb02fb0c4a5e1949da175 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 24 Nov 2018 12:35:46 +0100 Subject: Core: fix dump_trip_list() function In 64e6e435f82801f4f440ef5b1caf58a91a7c9929 the trip->when field was replaced by a function. This forgot to adapt dump_trip_list(), which is only compiled if DEBUG_TRIP is defined. Fix the function. Signed-off-by: Berthold Stoeger --- core/divelist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/divelist.c') diff --git a/core/divelist.c b/core/divelist.c index 4528e4cfd..100266eb1 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -751,14 +751,14 @@ void dump_trip_list(void) for (trip = dive_trip_list; trip; trip = trip->next) { struct tm tm; utc_mkdate(trip_date(trip), &tm); - if (trip->when < last_time) + if (trip_date(trip) < last_time) printf("\n\ndive_trip_list OUT OF ORDER!!!\n\n\n"); printf("%s trip %d to \"%s\" on %04u-%02u-%02u %02u:%02u:%02u (%d dives - %p)\n", trip->autogen ? "autogen " : "", ++i, trip->location, tm.tm_year, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, trip->dives.nr, trip); - last_time = trip->when; + last_time = trip_date(trip); } printf("-----\n"); } -- cgit v1.2.3-70-g09d2