From 23fc37a4a63fed66e63dd6f1da53943512d9decb Mon Sep 17 00:00:00 2001 From: marco candrian Date: Mon, 7 Jan 2008 06:08:26 +0100 Subject: [PATCH] not needed i_tmp variable removed and using h_index instead --- draw.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/draw.c b/draw.c index 2ebcaf89..1f8aefb0 100644 --- a/draw.c +++ b/draw.c @@ -175,7 +175,7 @@ draw_graph(DrawCtx *ctx, int x, int y, int w, int *h, int h_index, XColor color) { cairo_surface_t *surface; cairo_t *cr; - int i, i_tmp; + int i; surface = cairo_xlib_surface_create(globalconf.display, ctx->drawable, ctx->visual, ctx->width, ctx->height); cr = cairo_create (surface); @@ -184,16 +184,15 @@ draw_graph(DrawCtx *ctx, int x, int y, int w, int *h, int h_index, XColor color) cairo_set_line_width(cr, 1.0); cairo_set_source_rgb(cr, color.red / 65535.0, color.green / 65535.0, color.blue / 65535.0); - i_tmp = h_index; i = -1; while(++i < w) { cairo_move_to(cr, x, y); - cairo_line_to(cr, x, y - h[i_tmp]); + cairo_line_to(cr, x, y - h[h_index]); x++; - if (--i_tmp < 0) - i_tmp = w - 1; + if (--h_index < 0) + h_index = w - 1; } cairo_stroke(cr);