From 468cdea6e728cda520b72165f685983b22f4c1e4 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Mon, 25 Feb 2013 15:31:49 +0100 Subject: [PATCH] positional legends in AREA and LINE are optional if they are the last argument --- src/rrd_graph_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 62ab7b2b..8232ce84 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -617,12 +617,12 @@ graph_desc_t* newGraphDescription(image_desc_t *const im,enum gf_en gf,parsedarg if (first) { fraction=first->value; } else { rrd_set_error("No positional FRACTION"); return NULL; } } - /* legend */ + /* legend (it's optional if no other arguments follow)*/ if (!legend) { keyvalue_t* first=getFirstUnusedArgument(1,pa); if (first) { legend=first->value; dprintfparsed("got positional legend: %s - \n",first->value); - } else { rrd_set_error("No positional legend found"); return NULL; } + } } } else if (bitscmp(PARSE_VNAMERPN)) { if ((!vname)||(!rpn)) { -- 2.47.3