Browse Source

Rather embarrasing arithmetic fuckup

master
Dirk Engling 14 years ago
parent
commit
b8e5ab382e
  1. 2
      ot_iovec.c

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

Loading…
Cancel
Save