From 7f3fdad19290dd35b769b4dc4322cd0eda0e4153 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 15 Aug 2010 17:22:50 +0000 Subject: [PATCH] change for readability --- ChangeLog | 4 ++++ src/frontend/evaluate.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1e416cb6..86914df0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-08-15 Robert Larice + * src/frontend/evaluate.c : + change for readability + 2010-08-15 Robert Larice * src/spicelib/devices/cktask.c , * src/spicelib/parser/inp2m.c : diff --git a/src/frontend/evaluate.c b/src/frontend/evaluate.c index 84b8193a2..51c82d090 100644 --- a/src/frontend/evaluate.c +++ b/src/frontend/evaluate.c @@ -226,8 +226,8 @@ doop(char what, d1 = (double *) tmalloc(length * sizeof (double)); for (i = 0; i < v1->v_length; i++) d1[i] = v1->v_realdata[i]; - if (length > 0) - ld = v1->v_realdata[v1->v_length - 1]; + if (i > 0) + ld = v1->v_realdata[i - 1]; for ( ; i < length; i++) d1[i] = ld; } else { @@ -236,8 +236,8 @@ doop(char what, c1 = (complex *) tmalloc(length * sizeof (complex)); for (i = 0; i < v1->v_length; i++) c1[i] = v1->v_compdata[i]; - if (length > 0) - lc = v1->v_compdata[v1->v_length - 1]; + if (i > 0) + lc = v1->v_compdata[i - 1]; for ( ; i < length; i++) c1[i] = lc; } @@ -253,8 +253,8 @@ doop(char what, d2 = (double *) tmalloc(length * sizeof (double)); for (i = 0; i < v2->v_length; i++) d2[i] = v2->v_realdata[i]; - if (length > 0) - ld = v2->v_realdata[v2->v_length - 1]; + if (i > 0) + ld = v2->v_realdata[i - 1]; for ( ; i < length; i++) d2[i] = ld; } else { @@ -263,8 +263,8 @@ doop(char what, c2 = (complex *) tmalloc(length * sizeof (complex)); for (i = 0; i < v2->v_length; i++) c2[i] = v2->v_compdata[i]; - if (length > 0) - lc = v2->v_compdata[v2->v_length - 1]; + if (i > 0) + lc = v2->v_compdata[i - 1]; for ( ; i < length; i++) c2[i] = lc; }