]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
statsd plugin: Rename "metric_type_t" to avoid a name clash.
authorFlorian Forster <octo@google.com>
Fri, 17 Jul 2020 08:48:32 +0000 (10:48 +0200)
committerFlorian Forster <octo@google.com>
Tue, 21 Jul 2020 15:30:10 +0000 (17:30 +0200)
src/statsd.c

index 9050596f9d3f1894830d479a4d8d09bed27c4c22..322339c7b3dcdf0ec18a2cc1489c4145bb4abd9e 100644 (file)
 #define STATSD_DEFAULT_SERVICE "8125"
 #endif
 
-enum metric_type_e { STATSD_COUNTER, STATSD_TIMER, STATSD_GAUGE, STATSD_SET };
-typedef enum metric_type_e metric_type_t;
+typedef enum statsd_metric_type_e {
+  STATSD_COUNTER,
+  STATSD_TIMER,
+  STATSD_GAUGE,
+  STATSD_SET,
+} statsd_metric_type_t;
 
 struct statsd_metric_s {
-  metric_type_t type;
+  statsd_metric_type_t type;
   double value;
   derive_t counter;
   latency_counter_t *latency;
@@ -87,7 +91,7 @@ static bool conf_timer_count;
 
 /* Must hold metrics_lock when calling this function. */
 static statsd_metric_t *statsd_metric_lookup_unsafe(char const *name, /* {{{ */
-                                                    metric_type_t type) {
+                                                    statsd_metric_type_t type) {
   char key[DATA_MAX_NAME_LEN + 2];
   char *key_copy;
   statsd_metric_t *metric;
@@ -146,7 +150,7 @@ static statsd_metric_t *statsd_metric_lookup_unsafe(char const *name, /* {{{ */
 } /* }}} statsd_metric_lookup_unsafe */
 
 static int statsd_metric_set(char const *name, double value, /* {{{ */
-                             metric_type_t type) {
+                             statsd_metric_type_t type) {
   statsd_metric_t *metric;
 
   pthread_mutex_lock(&metrics_lock);
@@ -166,7 +170,7 @@ static int statsd_metric_set(char const *name, double value, /* {{{ */
 } /* }}} int statsd_metric_set */
 
 static int statsd_metric_add(char const *name, double delta, /* {{{ */
-                             metric_type_t type) {
+                             statsd_metric_type_t type) {
   statsd_metric_t *metric;
 
   pthread_mutex_lock(&metrics_lock);