]> sigrok.org Git - libsigrok.git/commitdiff
Add missing "ULL" suffixes.
authorUwe Hermann <redacted>
Sat, 19 Jan 2013 21:00:39 +0000 (22:00 +0100)
committerUwe Hermann <redacted>
Sun, 20 Jan 2013 19:39:18 +0000 (20:39 +0100)
These numbers are larger than 32bit, mark them as ULL to avoid compile
failures on 32bit systems.

hardware/asix-sigma/asix-sigma.c
strutil.c

index 9e8c3c86dd21f0fdad633b0ffd3dc74f69d08aaa..3c6b3e2c8107031c3324052b3ef3354c1b7950dd 100644 (file)
@@ -671,7 +671,7 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate)
        }
 
        devc->cur_samplerate = samplerate;
-       devc->period_ps = 1000000000000 / samplerate;
+       devc->period_ps = 1000000000000ULL / samplerate;
        devc->samples_per_event = 16 / devc->num_probes;
        devc->state.state = SIGMA_IDLE;
 
index 2c4d5c814e9503012a5a42d7ecddb66e4772c72a..5ac9b71912a7ef1fa4a03f6fef784f5e6727313d 100644 (file)
--- a/strutil.c
+++ b/strutil.c
@@ -404,11 +404,11 @@ SR_API int sr_parse_period(const char *periodstr, struct sr_rational *r)
                while (*s == ' ')
                        s++;
                if (!strcmp(s, "fs"))
-                       r->q = 1000000000000000L;
+                       r->q = 1000000000000000ULL;
                else if (!strcmp(s, "ps"))
-                       r->q = 1000000000000L;
+                       r->q = 1000000000000ULL;
                else if (!strcmp(s, "ns"))
-                       r->q = 1000000000L;
+                       r->q = 1000000000ULL;
                else if (!strcmp(s, "us"))
                        r->q = 1000000;
                else if (!strcmp(s, "ms"))