]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: use enum for RX filter
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 23 Aug 2017 11:55:38 +0000 (13:55 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 23 Aug 2017 13:01:30 +0000 (15:01 +0200)
conf.h

diff --git a/conf.h b/conf.h
index ea4fd4568df160ce745d3a45cdb0b1b8b5ce4b0f..25c98e1ee74b85ec0bca49f7bd0053175dea02b1 100644 (file)
--- a/conf.h
+++ b/conf.h
@@ -118,16 +118,18 @@ extern char *CNF_GetHwclockFile(void);
 extern int CNF_GetInitSources(void);
 extern double CNF_GetInitStepThreshold(void);
 
-#define CNF_HWTS_RXFILTER_ANY 0
-#define CNF_HWTS_RXFILTER_NONE 1
-#define CNF_HWTS_RXFILTER_NTP 2
-#define CNF_HWTS_RXFILTER_ALL 3
+typedef enum {
+  CNF_HWTS_RXFILTER_ANY,
+  CNF_HWTS_RXFILTER_NONE,
+  CNF_HWTS_RXFILTER_NTP,
+  CNF_HWTS_RXFILTER_ALL,
+} CNF_HwTs_RxFilter;
 
 typedef struct {
   char *name;
   int minpoll;
   int nocrossts;
-  int rxfilter;
+  CNF_HwTs_RxFilter rxfilter;
   double precision;
   double tx_comp;
   double rx_comp;