mirror of https://github.com/golang/go.git
cc: correct handling of allocn(0, 1, d)
Fixes #29. R=r https://golang.org/cl/152076
This commit is contained in:
parent
d38630fe3d
commit
ae39a1d8ec
|
|
@ -1566,9 +1566,8 @@ alloc(int32 n)
|
|||
void*
|
||||
allocn(void *p, int32 n, int32 d)
|
||||
{
|
||||
|
||||
if(p == nil)
|
||||
return alloc(d);
|
||||
return alloc(n+d);
|
||||
p = realloc(p, n+d);
|
||||
if(p == nil) {
|
||||
print("allocn out of mem\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue