diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-07-31 23:38:28 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-07-31 23:38:28 +0000 |
commit | 6aaa863432967b99d0e2c87116b4ec844b90436f (patch) | |
tree | 40d8a50800514332aab7e469c351e4491cab6dfe /src/vector.c | |
parent | ab02f47a297693752e1d68d5eaf914c77cfb652c (diff) |
Added appropriate casts from (void*) so that the code will compile
cleanly with a C++ compiler. (Tested using GCC 3.3)
Diffstat (limited to 'src/vector.c')
-rw-r--r-- | src/vector.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vector.c b/src/vector.c index e90a3f2..fc3d4e9 100644 --- a/src/vector.c +++ b/src/vector.c @@ -1,4 +1,4 @@ -/* $Id: vector.c,v 1.9 2003-05-30 16:21:48 rjkaes Exp $ +/* $Id: vector.c,v 1.10 2003-07-31 23:38:28 rjkaes Exp $ * * A vector implementation. The vector can be of an arbitrary length, and * the data for each entry is an lump of data (the size is stored in the @@ -58,7 +58,7 @@ vector_create(void) { vector_t vector; - vector = safemalloc(sizeof(struct vector_s)); + vector = (vector_t)safemalloc(sizeof(struct vector_s)); if (!vector) return NULL; @@ -118,7 +118,7 @@ vector_insert(vector_t vector, void *data, ssize_t len, int pos) (pos != INSERT_PREPEND && pos != INSERT_APPEND)) return -EINVAL; - entry = safemalloc(sizeof(struct vectorentry_s)); + entry = (struct vectorentry_s*)safemalloc(sizeof(struct vectorentry_s)); if (!entry) return -ENOMEM; |