diff --git a/ot_iovec.c b/ot_iovec.c index ea3dd23..a098733 100644 --- a/ot_iovec.c +++ b/ot_iovec.c @@ -14,7 +14,7 @@ #include "ot_iovec.h" void *iovec_increase( int *iovec_entries, struct iovec **iovector, size_t new_alloc ) { - void *new_ptr = realloc( *iovector, 1 + *iovec_entries * sizeof( struct iovec ) ); + void *new_ptr = realloc( *iovector, (1 + *iovec_entries ) * sizeof( struct iovec ) ); if( !new_ptr ) return NULL; *iovector = new_ptr;