summaryrefslogtreecommitdiffhomepage
path: root/src/heap.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2004-02-13 21:27:42 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2004-02-13 21:27:42 +0000
commitaee5a6384985746420fda1c07d4231c4272ae715 (patch)
treeec784f7f8aa36ef58566b8fe31c6927e52398089 /src/heap.c
parentbf22966f558ca95222c94706124a3a385f5aa0bf (diff)
Removed unnecessary casts (mostly dealing with memory allocation.) I
should never have added them in the first place. They don't really buy anything, and they can hide bugs.
Diffstat (limited to 'src/heap.c')
-rw-r--r--src/heap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/heap.c b/src/heap.c
index d8763b4..9125375 100644
--- a/src/heap.c
+++ b/src/heap.c
@@ -1,4 +1,4 @@
-/* $Id: heap.c,v 1.7 2003-07-31 23:42:51 rjkaes Exp $
+/* $Id: heap.c,v 1.8 2004-02-13 21:27:42 rjkaes Exp $
*
* Debugging versions of various heap related functions are combined
* here. The debugging versions include assertions and also print
@@ -82,7 +82,7 @@ debugging_strdup(const char* s, const char* file, unsigned long line)
assert(s != NULL);
len = strlen(s) + 1;
- ptr = (char*)malloc(len);
+ ptr = malloc(len);
if (!ptr)
return NULL;
memcpy(ptr, s, len);
@@ -113,11 +113,11 @@ malloc_shared_memory(size_t size)
strlcpy(buffer, shared_file, sizeof(buffer));
if ((fd = mkstemp(buffer)) == -1)
- return (void *)MAP_FAILED;
+ return MAP_FAILED;
unlink(buffer);
if (ftruncate(fd, size) == -1)
- return (void *)MAP_FAILED;
+ return MAP_FAILED;
ptr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
return ptr;