Fix warnings in vector.c

Signed-off-by: Vicent Marti <tanoku@gmail.com>
This commit is contained in:
Vicent Marti 2011-02-27 22:07:39 +02:00
parent 9b3985fa2f
commit da7c3c71c0

View File

@ -28,12 +28,10 @@
#include "vector.h" #include "vector.h"
static const double resize_factor = 1.75; static const double resize_factor = 1.75;
static const int minimum_size = 8; static const size_t minimum_size = 8;
static int resize_vector(git_vector *v) static int resize_vector(git_vector *v)
{ {
void **new_contents;
v->_alloc_size = ((unsigned int)(v->_alloc_size * resize_factor)) + 1; v->_alloc_size = ((unsigned int)(v->_alloc_size * resize_factor)) + 1;
if (v->_alloc_size < minimum_size) if (v->_alloc_size < minimum_size)
v->_alloc_size = minimum_size; v->_alloc_size = minimum_size;