1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:40:21 -07:00

cc: correct handling of allocn(0, 1, d)

Fixes #29.

R=r
https://golang.org/cl/152076
This commit is contained in:
Russ Cox 2009-11-11 14:52:21 -08:00
parent d38630fe3d
commit ae39a1d8ec

View File

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