From f97e4a2a354960707d0b9fa3764805aceef3f510 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 15 Dec 2015 19:48:28 +0100 Subject: [PATCH] plotting/plotit.c, cleanup search for common y_type --- src/frontend/plotting/plotit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 07f1a9bf1..23ba1436b 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -966,12 +966,12 @@ plotit(wordlist *wl, char *hcopy, char *devname) goto quit; } - /* See if there is one type we can give for the y scale... */ - for (j = vecs->v_type, d = vecs->v_link2; d; d = d->v_link2) - if (d->v_type != j) { - j = SV_NOTYPE; + /* See if there is one common v_type we can give for the y scale... */ + for (d = vecs->v_link2; d; d = d->v_link2) + if (d->v_type != vecs->v_type) break; - } + + j = d ? SV_NOTYPE : vecs->v_type; #ifndef X_DISPLAY_MISSING if (devname && eq(devname, "xgraph")) {