From 0b4b41eed84be29e21b0e65c8072b546b4fdd37e Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 9 Mar 2013 12:20:17 +0100 Subject: [PATCH] Add missing ULL suffixes to SR_MHZ() et al. This fixes bug #72. --- libsigrok.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsigrok.h b/libsigrok.h index bf0b8b29..d4dd7bb6 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -77,11 +77,11 @@ enum { /* Handy little macros */ #define SR_HZ(n) (n) -#define SR_KHZ(n) ((n) * 1000) -#define SR_MHZ(n) ((n) * 1000000) -#define SR_GHZ(n) ((n) * 1000000000) +#define SR_KHZ(n) ((n) * (uint64_t)(1000ULL)) +#define SR_MHZ(n) ((n) * (uint64_t)(1000000ULL)) +#define SR_GHZ(n) ((n) * (uint64_t)(1000000000ULL)) -#define SR_HZ_TO_NS(n) (1000000000 / (n)) +#define SR_HZ_TO_NS(n) ((uint64_t)(1000000000ULL) / (n)) /** libsigrok loglevels. */ enum {