From fbc7aee55fa971a2aaecbfd540ba5618376c5156 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 13 Apr 2011 19:34:00 -0300 Subject: [PATCH] atrf-path/gui.c (main): cycle counting was broken; fixed it --- tools/atrf-path/gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/atrf-path/gui.c b/tools/atrf-path/gui.c index 4781ee5..74c2647 100644 --- a/tools/atrf-path/gui.c +++ b/tools/atrf-path/gui.c @@ -173,7 +173,7 @@ void gui(const struct sweep *sweep, int sweeps) { SDL_Surface *surf; SDL_Event event; - int cycle = 0; + int cycle; int fail; if (SDL_Init(SDL_INIT_VIDEO) < 0) { @@ -188,7 +188,7 @@ void gui(const struct sweep *sweep, int sweeps) exit(1); } - while (cycle != sweeps || !sweeps) { + for (cycle = 0; cycle != sweeps || !sweeps; cycle++) { struct sample res[N_CHAN*2]; while (SDL_PollEvent(&event))