Skip to content

Commit 4ed22fe

Browse files
committed
fio: fix overflow trying to use 'd' suffix
Fix overflow that happened when using the 'd' time suffix on platforms with 32 bit longs which led to a time of less than 10 minutes being used.
1 parent c905743 commit 4ed22fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parse.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static unsigned long long get_mult_time(const char *str, int len,
167167
else if (!strcmp("h", c))
168168
mult = 60 * 60 * 1000000UL;
169169
else if (!strcmp("d", c))
170-
mult = 24 * 60 * 60 * 1000000UL;
170+
mult = 24 * 60 * 60 * 1000000ULL;
171171

172172
free(c);
173173
return mult;

0 commit comments

Comments
 (0)