1
0
mirror of git://erdgeist.org/opentracker synced 2025-01-27 15:16:31 +00:00

Rather embarrasing arithmetic fuckup

This commit is contained in:
erdgeist 2007-11-13 00:30:17 +00:00
parent 04214491ee
commit 17b2ce1082

View File

@ -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;