From fc7729eb78e7dae803546b3cc0011260e779a2e8 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Fri, 5 Jan 2018 13:02:43 +0100 Subject: [PATCH] cleanup: localize global variable Not needed to be global. Signed-off-by: Jan Mulder --- desktop-widgets/subsurfacewebservices.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index 6e4f191d6..d7eb2bfeb 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -33,8 +33,6 @@ #define PATH_MAX 4096 #endif -struct dive_table gps_location_table; - // TODO: This looks like should be ported to C code. or a big part of it. bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, const bool selected) { @@ -303,6 +301,8 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) struct dive *d; struct dive_site *ds; bool changed = false; + struct dive_table gps_location_table; + memset(&gps_location_table, 0, sizeof(dive_table)); (void)changed; clear_table(&gps_location_table); QByteArray url = tr("Webservice").toLocal8Bit();