(trunk libT) win32 portability fixes, reported by Alexey

This commit is contained in:
Charles Kerr
2009-01-10 02:22:13 +00:00
parent 7683452514
commit c6a454d2e2
6 changed files with 18 additions and 9 deletions

View File

@@ -161,12 +161,12 @@ makeroom( tr_benc * val,
const int len = val->val.l.alloc + count +
( count % LIST_SIZE ? LIST_SIZE -
( count % LIST_SIZE ) : 0 );
void * new = realloc( val->val.l.vals, len * sizeof( tr_benc ) );
if( NULL == new )
void * tmp = realloc( val->val.l.vals, len * sizeof( tr_benc ) );
if( !tmp )
return 1;
val->val.l.alloc = len;
val->val.l.vals = new;
val->val.l.vals = tmp;
}
return 0;