]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
positional legends in AREA and LINE are optional if they are the last argument
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 25 Feb 2013 14:31:49 +0000 (15:31 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 25 Feb 2013 14:31:49 +0000 (15:31 +0100)
src/rrd_graph_helper.c

index 62ab7b2bb45026d6a8ab610d4fb49b5d1d7cefb2..8232ce84ba35caebf6425fe242a705c33b6ffdd9 100644 (file)
@@ -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)) {