diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-11-06 09:14:31 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-11-06 09:14:55 +0000 |
commit | e1f5472395b08033c60054e8f87f3c61126c4fa4 (patch) | |
tree | 8b99c5379eaf99ac34675a879f0a23a3718afa0c /fish | |
parent | efad4f53923dcca94613e193d6383bd032e70498 (diff) | |
download | libguestfs-e1f5472395b08033c60054e8f87f3c61126c4fa4.tar.gz libguestfs-e1f5472395b08033c60054e8f87f3c61126c4fa4.tar.xz libguestfs-e1f5472395b08033c60054e8f87f3c61126c4fa4.zip |
Fixes for compiling on 32 bit.
Diffstat (limited to 'fish')
-rw-r--r-- | fish/alloc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fish/alloc.c b/fish/alloc.c index fd5be2cf..ad2dccc2 100644 --- a/fish/alloc.c +++ b/fish/alloc.c @@ -140,12 +140,12 @@ parse_size (const char *str, off_t *size_rtn) */ if (sscanf (str, "%"SCNu64"%c", &size, &type) == 2) { switch (type) { - case 'k': case 'K': size *= 1024L; break; - case 'm': case 'M': size *= 1024L * 1024; break; - case 'g': case 'G': size *= 1024L * 1024 * 1024; break; - case 't': case 'T': size *= 1024L * 1024 * 1024 * 1024; break; - case 'p': case 'P': size *= 1024L * 1024 * 1024 * 1024 * 1024; break; - case 'e': case 'E': size *= 1024L * 1024 * 1024 * 1024 * 1024 * 1024; break; + case 'k': case 'K': size *= 1024ULL; break; + case 'm': case 'M': size *= 1024ULL * 1024ULL; break; + case 'g': case 'G': size *= 1024ULL * 1024ULL * 1024ULL; break; + case 't': case 'T': size *= 1024ULL * 1024ULL * 1024ULL * 1024ULL; break; + case 'p': case 'P': size *= 1024ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL; break; + case 'e': case 'E': size *= 1024ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL; break; case 's': size *= 512; break; default: fprintf (stderr, _("could not parse size specification '%s'\n"), str); @@ -153,7 +153,7 @@ parse_size (const char *str, off_t *size_rtn) } } else if (sscanf (str, "%"SCNu64, &size) == 1) - size *= 1024; + size *= 1024ULL; else { fprintf (stderr, _("could not parse size specification '%s'\n"), str); return -1; |