summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2009-04-14 13:32:47 +0530
committerAmit Shah <amit.shah@redhat.com>2009-04-14 14:50:59 +0530
commit81aafdcb3950f2afa5a03b4e94e59dc920ab2ef7 (patch)
tree3009501985927803d0e07aea36d830b5f03c7d00
parente51793b310401340899de51f75705dee367dd62f (diff)
downloadalloc-perf-81aafdcb3950f2afa5a03b4e94e59dc920ab2ef7.tar.gz
alloc-perf-81aafdcb3950f2afa5a03b4e94e59dc920ab2ef7.tar.xz
alloc-perf-81aafdcb3950f2afa5a03b4e94e59dc920ab2ef7.zip
Properly convert input value to GB
Signed-off-by: Amit Shah <amit.shah@redhat.com>
-rw-r--r--test-file-zero-alloc-speed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-file-zero-alloc-speed.c b/test-file-zero-alloc-speed.c
index dacb1c2..55090c2 100644
--- a/test-file-zero-alloc-speed.c
+++ b/test-file-zero-alloc-speed.c
@@ -31,7 +31,7 @@
#include <sys/mount.h>
#include <sys/mman.h>
-#define GB (1024 * 1024 * 1024)
+#define GB(x) ((unsigned long long)x << 30)
int pre_test_setup(char *source, char *target, char *fstype,
unsigned long mntflags, char *mntopts, char *name, int *fd)
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
return -1;
}
- filesize = atol(argv[1]) * GB;
+ filesize = GB(atol(argv[1]));
source = argv[2];
target = argv[3];
fstype = argv[4];