summaryrefslogtreecommitdiff
path: root/src/http_message.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/http_message.c
parentbf22966f558ca95222c94706124a3a385f5aa0bf (diff)
downloadtinyproxy-aee5a6384985746420fda1c07d4231c4272ae715.tar.gz
tinyproxy-aee5a6384985746420fda1c07d4231c4272ae715.zip
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/http_message.c')
-rw-r--r--src/http_message.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/http_message.c b/src/http_message.c
index 25ad2b6..6313da3 100644
--- a/src/http_message.c
+++ b/src/http_message.c
@@ -1,4 +1,4 @@
-/* $Id: http_message.c,v 1.3 2003-07-31 23:38:28 rjkaes Exp $
+/* $Id: http_message.c,v 1.4 2004-02-13 21:27:42 rjkaes Exp $
*
* See 'http_message.h' for a detailed description.
*
@@ -81,11 +81,11 @@ http_message_create(int response_code, const char* response_string)
http_message_t msg;
int ret;
- msg = (http_message_t)safecalloc(1, sizeof(struct http_message_s));
+ msg = safecalloc(1, sizeof(struct http_message_s));
if (msg == NULL)
return NULL;
- msg->headers.strings = (char**)safecalloc(NUMBER_OF_HEADERS, sizeof(char*));
+ msg->headers.strings = safecalloc(NUMBER_OF_HEADERS, sizeof(char*));
if (msg->headers.strings == NULL) {
safefree(msg);
return NULL;
@@ -182,8 +182,8 @@ http_message_add_headers(http_message_t msg, char** headers,
* available, reallocate the memory.
*/
if (msg->headers.used + num_headers > msg->headers.total) {
- new_headers = (char**)safecalloc(msg->headers.total * 2,
- sizeof(char*));
+ new_headers = safecalloc(msg->headers.total * 2,
+ sizeof(char*));
if (new_headers == NULL)
return -ENOMEM;