]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
the %s portion of the printf format is optional
authorTobias Oetiker <tobi@oetiker.ch>
Tue, 16 Sep 2014 09:38:48 +0000 (11:38 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Tue, 16 Sep 2014 09:39:08 +0000 (11:39 +0200)
src/rrd_graph.c

index 685f7e9afb74fcc665a61d61a4670210dff2eb0a..359fd8ab1a0aa026a216b299c18a149b47d699df 100644 (file)
@@ -4825,7 +4825,7 @@ int bad_format_axis(char *fmt){
 }
 
 int bad_format_print(char *fmt){
-    return bad_format_check("^" SAFE_STRING FLOAT_STRING SAFE_STRING "%s" SAFE_STRING "$",fmt);
+    return bad_format_check("^" SAFE_STRING FLOAT_STRING SAFE_STRING "(?:%s)?" SAFE_STRING "$",fmt);
 }
 
 int vdef_parse(