From 64d6a5d7c0efdc251b1e9ba4f5ccd669f9c3290e Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 26 Dec 2015 19:43:18 +0100 Subject: [PATCH] plotting/plotit.c, xtend(), #6/7 drop some local variables --- src/frontend/plotting/plotit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index abdeab596..fe36654cb 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -85,8 +85,6 @@ static void xtend(struct dvec *v, int length) { int i; - ngcomplex_t c, *oc; - double d, *od; if (v->v_length == length) return; @@ -99,19 +97,17 @@ xtend(struct dvec *v, int length) if (isreal(v)) { double d = NAN; v->v_realdata = TREALLOC(double, v->v_realdata, length); - od = v->v_realdata; i = v->v_length; if (i > 0) - d = od[i - 1]; + d = v->v_realdata[i - 1]; while (i < length) v->v_realdata[i++] = d; } else { ngcomplex_t c = {NAN, NAN}; v->v_compdata = TREALLOC(ngcomplex_t, v->v_compdata, length); - oc = v->v_compdata; i = v->v_length; if (i > 0) - c = oc[i - 1]; + c = v->v_compdata[i - 1]; while (i < length) v->v_compdata[i++] = c; }