aboutsummaryrefslogtreecommitdiff
path: root/vector.c
diff options
context:
space:
mode:
Diffstat (limited to 'vector.c')
-rw-r--r--vector.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vector.c b/vector.c
index 87eba37..0bcd1dc 100644
--- a/vector.c
+++ b/vector.c
@@ -4,14 +4,13 @@
#include <string.h>
#include <math.h>
#include <stdio.h>
+#include <assert.h>
static inline vector_t *vector_exists(vector_t *v)
{
- if (v) {
- return v;
- }
+ assert(v);
- return (vector_t *) malloc(sizeof(vector_t));
+ return v;
}
// Overwrites stuff in p. If p is null a new vector is created