]> git.itanic.dy.fi Git - rrdd/commitdiff
Add MIN() macro
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 24 Jun 2012 08:54:35 +0000 (11:54 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 24 Jun 2012 08:56:04 +0000 (11:56 +0300)
As we don't have yet any header for random useful macros, add this
here so that parsers can utilize it.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
parser.h

index 531d4f29072912f6569414b20df226481ec5cbd7..64f119a5890723ea6d0f429827981c3f36174662 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -11,4 +11,6 @@ int digitemp_parser_mod(char *data, const char **p);
 int script_parser(char *rrd_data, const char **parser_data);
 int netstats_parser(char *rrd_data, const char **parser_data);
 
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
 #endif