[Pkg-wmaker-commits] [wmforecast] 13/63: removed check to see if result of wmalloc was NULL
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 7a6402e8a004244cdf232cdecdaac4bd63f2ddc2
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Apr 21 00:16:55 2014 -0500
removed check to see if result of wmalloc was NULL
---
ChangeLog | 6 +++++-
wmforecast.c | 6 ------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 480ed0a..a1bd9d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-04-21 Doug Torrance <dtorrance at monmouthcollege.edu>
- * wmforecast.c: changed all calls to free to use WINGs's native wfree
+ * wmforecast.c: changed all calls to free to use WINGs's native wfree;
+ removed if statements before calls to free, since wfree already does
+ this
+ * wmforecast.c (WriteMemoryCallback): removed check to see if result of
+ wrealloc was NULL (wrealloc already does this)
* ChangeLog: corrected year in all entries (it's not 2015 yet...)
2014-04-19 Doug Torrance <dtorrance at monmouthcollege.edu>
diff --git a/wmforecast.c b/wmforecast.c
index 89553fa..f253ea3 100755
--- a/wmforecast.c
+++ b/wmforecast.c
@@ -302,12 +302,6 @@ WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
struct MemoryStruct *mem = (struct MemoryStruct *)userp;
mem->memory = wrealloc(mem->memory, mem->size + realsize + 1);
- if(mem->memory == NULL) {
- /* out of memory! */
- printf("not enough memory (wrealloc returned NULL)\n");
- return 0;
- }
-
memcpy(&(mem->memory[mem->size]), contents, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
--
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