From 79cc996a93437ea835fd18c1dcd45bf33fc3e24d Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 10 Jun 2017 09:49:36 +0200 Subject: [PATCH] device.c, #12/19, shrink scope of variable 'wlen' and 'maxelem' --- src/frontend/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/device.c b/src/frontend/device.c index 9969ca047..1e31fb362 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -1123,7 +1123,7 @@ com_alter_common(wordlist *wl, int do_model) struct pnode *names; /* DIE 2009_02_06 */ - int i, wlen, maxelem = 3; + int i; wordlist *wl2; if (!ft_curckt) { @@ -1180,7 +1180,8 @@ com_alter_common(wordlist *wl, int do_model) multiple param value pairs are not supported! */ wordlist *wlin = parent->wl_next; - wlen = wl_length(wlin); + int wlen = wl_length(wlin); + int maxelem = 3; /* Return the last element of wlin */ wlin = wl_nthelem(100, wlin); /* no more than 100 vector elements */