diff --git a/include/villas/utils.h b/include/villas/utils.h index ba10966c8..d47d42f75 100644 --- a/include/villas/utils.h +++ b/include/villas/utils.h @@ -37,10 +37,6 @@ extern "C" { #include #include -#ifdef __cplusplus -extern "C"{ -#endif - #ifdef __GNUC__ #define LIKELY(x) __builtin_expect((x),1) @@ -264,7 +260,8 @@ __attribute__((always_inline)) static inline uint64_t rdtsc() } /** Get log2 of long long integers */ -static inline int log2i(long long x) { +static inline int log2i(long long x) +{ if (x == 0) return 1;