summaryrefslogtreecommitdiff
path: root/src/buffer.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/buffer.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 '')
-rw-r--r--src/buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index db805d1..0497fbc 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,4 +1,4 @@
-/* $Id: buffer.c,v 1.23 2003-07-31 23:38:28 rjkaes Exp $
+/* $Id: buffer.c,v 1.24 2004-02-13 21:27:42 rjkaes Exp $
*
* The buffer used in each connection is a linked list of lines. As the lines
* are read in and written out the buffer expands and contracts. Basically,
@@ -60,10 +60,10 @@ makenewline(unsigned char *data, size_t length)
assert(data != NULL);
assert(length > 0);
- if (!(newline = (struct bufline_s*)safemalloc(sizeof(struct bufline_s))))
+ if (!(newline = safemalloc(sizeof(struct bufline_s))))
return NULL;
- if (!(newline->string = (unsigned char*)safemalloc(length))) {
+ if (!(newline->string = safemalloc(length))) {
safefree(newline);
return NULL;
}
@@ -104,7 +104,7 @@ new_buffer(void)
{
struct buffer_s *buffptr;
- if (!(buffptr = (struct buffer_s*)safemalloc(sizeof(struct buffer_s))))
+ if (!(buffptr = safemalloc(sizeof(struct buffer_s))))
return NULL;
/*