From: Tobias Oetiker Date: Mon, 25 Feb 2013 14:31:49 +0000 (+0100) Subject: positional legends in AREA and LINE are optional if they are the last argument X-Git-Tag: v1.5.0-rc1~195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=468cdea6e728cda520b72165f685983b22f4c1e4;p=thirdparty%2Frrdtool-1.x.git positional legends in AREA and LINE are optional if they are the last argument --- 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)) {