[Pkg-wmaker-commits] [wmforecast] 12/63: free -> wfree
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 17 11:20:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmforecast.
commit 1c284cae8054065acfeef4c8323c05c50284fe64
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Apr 21 00:12:07 2014 -0500
free -> wfree
---
ChangeLog | 12 ++++++++----
wmforecast.c | 35 ++++++++++++-----------------------
2 files changed, 20 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fc9caa5..480ed0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2015-04-19 Doug Torrance <dtorrance at monmouthcollege.edu>
+2014-04-21 Doug Torrance <dtorrance at monmouthcollege.edu>
+ * wmforecast.c: changed all calls to free to use WINGs's native wfree
+ * ChangeLog: corrected year in all entries (it's not 2015 yet...)
+
+2014-04-19 Doug Torrance <dtorrance at monmouthcollege.edu>
* switched timer handler from pthread to WING's native WMAddPersistent-
TimerHandler and added --interval option, resulting in numerous changes:
* configure.ac: removed check for pthread
@@ -17,7 +21,7 @@
* wmforecast.c (refresh): new function, refreshes weather data when icon
double clicked
-2015-04-17 Doug Torrance <dtorrance at monmouthcollege.edu>
+2014-04-17 Doug Torrance <dtorrance at monmouthcollege.edu>
* wmforecast.c: improved error handling -- Weather struct now contains
errorFlag and errorText. If errorFlag set to 1, "ERROR" is displayed
in dockapp along along with an icon with a question mark, and
@@ -26,7 +30,7 @@
stderr for errors now use this. This avoids, e.g., a segfault when
the internet is down.
-2015-04-16 Doug Torrance <dtorrance at monmouthcollege.edu>
+2014-04-16 Doug Torrance <dtorrance at monmouthcollege.edu>
* wmforecast.c: bugfix -- After downloading the weather, the Weather
struct was being freed, but it contained the pointer to the icon
currently used by the dockapp, causing a crash. This has been fixed.
@@ -34,7 +38,7 @@
Forecast and ForecastArray structs inside each Weather struct.
* README: expanded description
-2015-04-15 Doug Torrance <dtorrance at monmouthcollege.edu>
+2014-04-15 Doug Torrance <dtorrance at monmouthcollege.edu>
* wmforecast.c: fixed bug where window was still drawn with --help or
--version by moving the call to setPreferences earlier;
diff --git a/wmforecast.c b/wmforecast.c
index 508b1ae..89553fa 100755
--- a/wmforecast.c
+++ b/wmforecast.c
@@ -110,14 +110,10 @@ Weather *newWeather()
void freeForecast(Forecast *forecast)
{
- if (forecast->day)
- free(forecast->day);
- if (forecast->low)
- free(forecast->low);
- if (forecast->high)
- free(forecast->high);
- if (forecast->text)
- free(forecast->text);
+ wfree(forecast->day);
+ wfree(forecast->low);
+ wfree(forecast->high);
+ wfree(forecast->text);
}
@@ -127,23 +123,18 @@ void freeForecastArray(ForecastArray *array)
for (i = 0; i < array->length; i++)
if (&array->forecasts[i])
freeForecast(&array->forecasts[i]);
- if (array)
- free(array);
+ wfree(array);
}
void freeWeather(Weather *weather)
{
- if (weather->temp)
- free(weather->temp);
- if (weather->text)
- free(weather->text);
- if (weather->title)
- free(weather->title);
+ wfree(weather->temp);
+ wfree(weather->text);
+ wfree(weather->title);
if (weather->forecasts)
freeForecastArray(weather->forecasts);
- if (weather->errorText)
- free(weather->errorText);
- free(weather);
+ wfree(weather->errorText);
+ wfree(weather);
}
void setTitle(Weather *weather, const char *title)
@@ -359,8 +350,7 @@ Weather *getWeather(WMScreen *screen, Preferences *prefs)
setError(weather, screen, curl_easy_strerror(res));
curl_easy_cleanup(curl_handle);
curl_global_cleanup();
- if(chunk.memory)
- free(chunk.memory);
+ wfree(chunk.memory);
return weather;
}
curl_easy_cleanup(curl_handle);
@@ -437,8 +427,7 @@ Weather *getWeather(WMScreen *screen, Preferences *prefs)
xmlFreeDoc(doc);
// finishing parsing xml
- if(chunk.memory)
- free(chunk.memory);
+ wfree(chunk.memory);
return weather;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmforecast.git
More information about the Pkg-wmaker-commits
mailing list