From: Matthias Braun Date: Thu, 7 Sep 2006 11:33:35 +0000 (+0000) Subject: don't crash with missing argument X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b4be8ba661f36f3fa7bd3c2903bb191d0734294c;p=libfirm don't crash with missing argument --- diff --git a/ir/be/test/langshootout/n-body.c b/ir/be/test/langshootout/n-body.c index c1aa2e45e..7081537f2 100644 --- a/ir/be/test/langshootout/n-body.c +++ b/ir/be/test/langshootout/n-body.c @@ -129,9 +129,12 @@ struct planet bodies[NBODIES] = { int main(int argc, char ** argv) { - int n = atoi(argv[1]); + int n = 1000000; int i; + if(argc > 1) + n = atoi(argv[1]); + offset_momentum(NBODIES, bodies); printf ("%.9f\n", energy(NBODIES, bodies)); for (i = 1; i <= n; i++)