Clean-up: run format-cpp on the tree
[lttng-tools.git] / src / common / testpoint / testpoint.hpp
index 33cb9aa340cc71e64939be17844aaea3e42fa26c..3682493eae4202750b083275dfae34dd82c9a621 100644 (file)
@@ -23,40 +23,38 @@ void *lttng_testpoint_lookup(const char *name);
  * set.
  * Return a non-zero error code to indicate failure.
  */
-#define testpoint(name)                                \
-       ((caa_unlikely(lttng_testpoint_activated))      \
-       ? __testpoint_##name##_wrapper() : 0)
+#define testpoint(name) \
+       ((caa_unlikely(lttng_testpoint_activated)) ? __testpoint_##name##_wrapper() : 0)
 
 /*
  * One wrapper per testpoint is generated. This is to keep track of the symbol
  * lookup status and the corresponding function pointer, if any.
  */
-#define _TESTPOINT_DECL(_name)                                         \
-       static inline int __testpoint_##_name##_wrapper(void)           \
-       {                                                               \
-               int ret = 0;                                            \
-               static int (*tp)(void);                                 \
-               static int found;                                       \
-               const char *tp_name = "__testpoint_" #_name;            \
-                                                                       \
-               if (tp) {                                               \
-                       ret = tp();                                     \
-               } else {                                                \
-                       if (!found) {                                   \
-                               tp = (int (*)(void)) lttng_testpoint_lookup(tp_name);   \
-                               if (tp) {                               \
-                                       found = 1;                      \
-                                       ret = tp();                     \
-                               } else {                                \
-                                       found = -1;                     \
-                               }                                       \
-                       }                                               \
-               }                                                       \
-               return ret;                                             \
+#define _TESTPOINT_DECL(_name)                                                        \
+       static inline int __testpoint_##_name##_wrapper(void)                         \
+       {                                                                             \
+               int ret = 0;                                                          \
+               static int (*tp)(void);                                               \
+               static int found;                                                     \
+               const char *tp_name = "__testpoint_" #_name;                          \
+                                                                                      \
+               if (tp) {                                                             \
+                       ret = tp();                                                   \
+               } else {                                                              \
+                       if (!found) {                                                 \
+                               tp = (int (*)(void)) lttng_testpoint_lookup(tp_name); \
+                               if (tp) {                                             \
+                                       found = 1;                                    \
+                                       ret = tp();                                   \
+                               } else {                                              \
+                                       found = -1;                                   \
+                               }                                                     \
+                       }                                                             \
+               }                                                                     \
+               return ret;                                                           \
        }
 
 /* Testpoint declaration */
-#define TESTPOINT_DECL(name)   \
-       _TESTPOINT_DECL(name)
+#define TESTPOINT_DECL(name) _TESTPOINT_DECL(name)
 
 #endif /* NTESTPOINT */
This page took 0.024845 seconds and 4 git commands to generate.