Sfoglia il codice sorgente

Making AVG_NUM configurable by compiler define (Submitted by Lars)

A minor change which makes the AVG_NUM configurable by compiler define.
Partly Closed #956 and Closes #1166
Jan Wagner 12 anni fa
parent
commit
c5dc81cd28
2 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 2 0
      plugins/check_ntp.c
  2. 2 0
      plugins/check_ntp_time.c

+ 2 - 0
plugins/check_ntp.c

@@ -54,7 +54,9 @@ void print_help (void);
 void print_usage (void);
 
 /* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
 #define AVG_NUM 4
+#endif
 
 /* max size of control message data */
 #define MAX_CM_SIZE 468

+ 2 - 0
plugins/check_ntp_time.c

@@ -55,7 +55,9 @@ void print_help (void);
 void print_usage (void);
 
 /* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
 #define AVG_NUM 4
+#endif
 
 /* max size of control message data */
 #define MAX_CM_SIZE 468