From: Uwe Hermann Date: Sat, 9 Mar 2013 11:20:17 +0000 (+0100) Subject: Add missing ULL suffixes to SR_MHZ() et al. X-Git-Tag: dsupstream~254 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0b4b41eed84be29e21b0e65c8072b546b4fdd37e;p=libsigrok.git Add missing ULL suffixes to SR_MHZ() et al. This fixes bug #72. --- 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 {