Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2006-03-23 20:45:40 +0300
committerKent Mein <mein@cs.umn.edu>2006-03-23 20:45:40 +0300
commit391ae8f7ac4d91d81c82640f5efe7b031275d9f1 (patch)
tree2e50841fc83b838787bf87ea00ecc888af902d90 /intern/guardedalloc
parenta837e1e8c06114f527e3809a90b790890e4d1d7e (diff)
Updated mallocn.c MEM_check_memory_integrity was casting
a string as an int and it was causing a warning. I changed it to check to see if the string == 0 return 0 else return 1. The only thing that called this function was memtest.c and it had outdated code, so I fixed that... was calling MEM_set_error_stream updated to MEM_set_error_callback Kent
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/intern/mallocn.c3
-rw-r--r--intern/guardedalloc/test/simpletest/memtest.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 3e6aed7871a..fc345eee5a8 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -157,7 +157,8 @@ int MEM_check_memory_integrity()
err_val = check_memlist(listend);
- return (int)err_val;
+ if (err_val == 0) return 0;
+ return 1;
}
diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c
index 7c5a8230ea7..c35af2d9ce2 100644
--- a/intern/guardedalloc/test/simpletest/memtest.c
+++ b/intern/guardedalloc/test/simpletest/memtest.c
@@ -78,7 +78,7 @@ int main (int argc, char *argv[])
/* Round one, do a normal allocation, and free the blocks again. */
/* ----------------------------------------------------------------- */
/* flush mem lib output to stderr */
- MEM_set_error_stream(stderr);
+ MEM_set_error_callback(stderr);
for (i = 0; i < NUM_BLOCKS; i++) {
int blocksize = 10000;
@@ -110,7 +110,7 @@ int main (int argc, char *argv[])
/* Round two, do a normal allocation, and corrupt some blocks. */
/* ----------------------------------------------------------------- */
/* switch off, because it will complain about some things. */
- MEM_set_error_stream(NULL);
+ MEM_set_error_callback(NULL);
for (i = 0; i < NUM_BLOCKS; i++) {
int blocksize = 10000;