diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-11-06 16:08:53 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-11-06 16:08:53 +0000 |
commit | e1cac83a1c3502654f669b5463a9a8a7a44bf9db (patch) | |
tree | 12c011a685f80dd13371ff6ecf0742bd5e800e55 /app/x11perf/do_rects.c | |
parent | d7d55fb55f26adac2bcd65388bb9fc0fa17362e1 (diff) |
Update x11perf to version 1.6.2
Diffstat (limited to 'app/x11perf/do_rects.c')
-rw-r--r-- | app/x11perf/do_rects.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/x11perf/do_rects.c b/app/x11perf/do_rects.c index b4507bc56..4c03d9ca7 100644 --- a/app/x11perf/do_rects.c +++ b/app/x11perf/do_rects.c @@ -30,7 +30,6 @@ static GC pgc; int InitRectangles(XParms xp, Parms p, int64_t reps) { - int i; int size = p->special; int step; int x, y; @@ -48,7 +47,7 @@ InitRectangles(XParms xp, Parms p, int64_t reps) lw = (lw >> 1) + 1; } - rects = (XRectangle *)malloc(p->objects * sizeof(XRectangle)); + rects = malloc(p->objects * sizeof(XRectangle)); x = lw; y = lw; rows = 0; @@ -61,7 +60,7 @@ InitRectangles(XParms xp, Parms p, int64_t reps) step = size + 1 + (size % 2); } - for (i = 0; i != p->objects; i++) { + for (int i = 0; i != p->objects; i++) { rects[i].x = x; rects[i].y = y; rects[i].width = rects[i].height = size; @@ -86,9 +85,7 @@ InitRectangles(XParms xp, Parms p, int64_t reps) void DoRectangles(XParms xp, Parms p, int64_t reps) { - int i; - - for (i = 0; i != reps; i++) { + for (int i = 0; i != reps; i++) { XFillRectangles(xp->d, xp->w, pgc, rects, p->objects); if (pgc == xp->bggc) pgc = xp->fggc; @@ -101,9 +98,7 @@ DoRectangles(XParms xp, Parms p, int64_t reps) void DoOutlineRectangles(XParms xp, Parms p, int64_t reps) { - int i; - - for (i = 0; i != reps; i++) { + for (int i = 0; i != reps; i++) { XDrawRectangles (xp->d, xp->w, pgc, rects, p->objects); if (pgc == xp->bggc) pgc = xp->fggc; |