Core: fix dump_trip_list() function

In 64e6e435f8 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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-11-24 12:35:46 +01:00 committed by Dirk Hohndel
parent 2c77142696
commit 54fcda4c32

View file

@ -751,14 +751,14 @@ void dump_trip_list(void)
for (trip = dive_trip_list; trip; trip = trip->next) { for (trip = dive_trip_list; trip; trip = trip->next) {
struct tm tm; struct tm tm;
utc_mkdate(trip_date(trip), &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("\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", printf("%s trip %d to \"%s\" on %04u-%02u-%02u %02u:%02u:%02u (%d dives - %p)\n",
trip->autogen ? "autogen " : "", trip->autogen ? "autogen " : "",
++i, trip->location, ++i, trip->location,
tm.tm_year, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
trip->dives.nr, trip); trip->dives.nr, trip);
last_time = trip->when; last_time = trip_date(trip);
} }
printf("-----\n"); printf("-----\n");
} }