aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2020-06-09 22:43:41 +0000
committerrodri <rgl@antares-labs.eu>2020-06-09 22:43:41 +0000
commite93cc98dc53f3f3480c0ad2b26e0e98735ed791f (patch)
tree4aa1b35e8161c344113a4e061e8fd64b15d14c68
parent6572c456f7cdf6f8aaaf361e618b41816084a7ae (diff)
downloadboids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.tar.gz
boids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.tar.bz2
boids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.zip
unnecessary realloc tagging.
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index a9c33cb..ec72a0f 100644
--- a/main.c
+++ b/main.c
@@ -68,13 +68,13 @@ newflock(int nbirds, Rectangle jail)
f->birds = realloc(f->birds, ++f->nbirds*sizeof(Bird));
if(f->birds == nil)
sysfatal("realloc: %r");
- setrealloctag(f->birds, getcallerpc(&nbirds));
b = &f->birds[f->nbirds-1];
b->p = Pt2(frand()*Dx(jail),frand()*Dy(jail),1);
b->v = Vec2(cos(frand()*2*PI),sin(frand()*2*PI));
b->v = mulpt2(b->v, TERMINALV);
b->color = pal[Cfg];
}
+ setrealloctag(f->birds, getcallerpc(&nbirds));
return f;
}