]> git.itanic.dy.fi Git - rrdd/commitdiff
Add utils.h
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 19 Nov 2012 16:40:29 +0000 (18:40 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 19 Nov 2012 16:40:29 +0000 (18:40 +0200)
Collect all random utilities in one header file available to all
users.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
onewire_parser.c
parser.c
utils.h [new file with mode: 0644]

index e5d37ea082044a419dbce03437b605d3b9f824dd..f878b0949fd6f20f8cba0b83de9a935be7521f1f 100644 (file)
@@ -4,6 +4,7 @@
 #include "parser.h"
 #include "debug.h"
 #include "string.h"
 #include "parser.h"
 #include "debug.h"
 #include "string.h"
+#include "utils.h"
 
 int parse_opts(const char *str, char *ow_path, size_t pathlen, double *offset)
 {
 
 int parse_opts(const char *str, char *ow_path, size_t pathlen, double *offset)
 {
index bffe3377b3d2083af3727a691814a9fb548454d0..887b524e6ad12df4a89c9e69d5cf845650c2bfc9 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -6,6 +6,7 @@
 #include "process.h"
 #include "string.h"
 #include "debug.h"
 #include "process.h"
 #include "string.h"
 #include "debug.h"
+#include "utils.h"
 
 #define STATFILE "/proc/stat"
 
 
 #define STATFILE "/proc/stat"
 
diff --git a/utils.h b/utils.h
new file mode 100644 (file)
index 0000000..c3d639a
--- /dev/null
+++ b/utils.h
@@ -0,0 +1,6 @@
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#endif