summaryrefslogtreecommitdiffhomepage
path: root/src/child.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/child.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/child.c')
-rw-r--r--src/child.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/child.c b/src/child.c
index f7ddf23..25f87fa 100644
--- a/src/child.c
+++ b/src/child.c
@@ -1,4 +1,4 @@
-/* $Id: child.c,v 1.13 2003-08-07 15:31:20 rjkaes Exp $
+/* $Id: child.c,v 1.14 2004-02-13 21:27:42 rjkaes Exp $
*
* Handles the creation/destruction of the various children required for
* processing incoming connections.
@@ -165,7 +165,7 @@ child_main(struct child_s* ptr)
struct sockaddr *cliaddr;
socklen_t clilen;
- cliaddr = (struct sockaddr*)safemalloc(addrlen);
+ cliaddr = safemalloc(addrlen);
if (!cliaddr) {
log_message(LOG_CRIT,
"Could not allocate memory for child address.");
@@ -293,15 +293,14 @@ child_pool_create(void)
return -1;
}
- child_ptr = (struct child_s*)calloc_shared_memory(
- child_config.maxclients,
- sizeof(struct child_s));
+ child_ptr = calloc_shared_memory(child_config.maxclients,
+ sizeof(struct child_s));
if (!child_ptr) {
log_message(LOG_ERR, "Could not allocate memory for children.");
return -1;
}
- servers_waiting = (unsigned int*)malloc_shared_memory(sizeof(unsigned int));
+ servers_waiting = malloc_shared_memory(sizeof(unsigned int));
if (servers_waiting == MAP_FAILED) {
log_message(LOG_ERR, "Could not allocate memory for child counting.");
return -1;