diff --git a/sigrok.h b/sigrok.h index 4b6e2640..8b2e1265 100644 --- a/sigrok.h +++ b/sigrok.h @@ -50,9 +50,9 @@ #define SIGROK_ERR_SAMPLERATE -3 /* Incorrect samplerate */ /* Handy little macros */ -#define KHZ(n) (n * 1000) -#define MHZ(n) (n * 1000000) -#define GHZ(n) (n * 1000000000) +#define KHZ(n) ((n) * 1000) +#define MHZ(n) ((n) * 1000000) +#define GHZ(n) ((n) * 1000000000) #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))