summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-10-27 12:59:29 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-10-27 13:00:20 -0400
commit362229f184c92712ee5a3027ce5d29024ca5b382 (patch)
treecfa515aa6d0c9e15ae7d794fd26cb7b5d4fc20d1 /src/lib
parent5de66739724451801487dbec0eb210c0595cc00f (diff)
downloadtor-362229f184c92712ee5a3027ce5d29024ca5b382.tar.gz
tor-362229f184c92712ee5a3027ce5d29024ca5b382.zip
lib/metrics: Fix wrong macro expansion
The "METRICS_PREFIX" was not expanded but rather used as a litteral. Fix that by just removing the define and using "tor_" directly. Reviewed-by: Alexander Færøy <ahf@torproject.org> Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/metrics/metrics_common.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/metrics/metrics_common.h b/src/lib/metrics/metrics_common.h
index 50f6147007..c684a3ec42 100644
--- a/src/lib/metrics/metrics_common.h
+++ b/src/lib/metrics/metrics_common.h
@@ -11,14 +11,10 @@
#include "lib/cc/torint.h"
-/** Prefix to every metrics exposed. This is insures that the metrics are
- * always in the same namespace. */
-#define METRICS_PREFIX tor_
-
/** Helper macro that must be used to construct the right namespaced metrics
* name. A name is a string so stringify the result. */
#define METRICS_STR(val) #val
-#define METRICS_NAME(name) METRICS_STR(METRICS_PREFIX ## name)
+#define METRICS_NAME(name) METRICS_STR(tor_ ## name)
/** Format output type. */
typedef enum {