frontend/plotting/plotit.c, cleanup, reduce scope of `struct dvec *dv'

This commit is contained in:
rlar 2015-08-15 21:04:58 +02:00
parent a4c7dff570
commit 73731bdf77
1 changed files with 5 additions and 1 deletions

View File

@ -230,7 +230,7 @@ plotit(wordlist *wl, char *hcopy, char *devname)
bool gfound = FALSE, pfound = FALSE, oneval = FALSE;
double *dd, ylims[2], xlims[2];
struct pnode *pn, *names;
struct dvec *dv, *d = NULL, *vecs = NULL, *lv, *lastvs = NULL;
struct dvec *d = NULL, *vecs = NULL, *lv, *lastvs = NULL;
char *xn;
int i, j, xt;
double tt;
@ -546,6 +546,8 @@ plotit(wordlist *wl, char *hcopy, char *devname)
if (pn->pn_value && (pn->pn_value->v_length == 0) &&
eq(pn->pn_value->v_name, "vs"))
{
struct dvec *dv;
if (!lv) {
fprintf(cp_err, "Error: misplaced vs arg\n");
goto quit;
@ -572,6 +574,8 @@ plotit(wordlist *wl, char *hcopy, char *devname)
} else {
struct dvec *dv;
dv = ft_evaluate(pn);
if (!dv)
goto quit;