executor: don't fallthrough in switches in fuchsia (#1103)

This commit modifies the common_fuchsia.h file changing the behavior of
the `syz_future_time function`. Before, the function used to have a switch
case that would fallthrough, making it always set the delta_ms to 10000.
The fix is to add a `break;` statement after each switch case.
This commit is contained in:
Marco Vanotti 2019-04-03 15:48:43 -07:00 committed by Julia Hansbrough
parent ce4e53939e
commit 8658c25622
2 changed files with 6 additions and 0 deletions

View File

@ -226,10 +226,13 @@ static long syz_future_time(volatile long when)
switch (when) {
case 0:
delta_ms = 5;
break;
case 1:
delta_ms = 30;
break;
default:
delta_ms = 10000;
break;
}
zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC);
return now + delta_ms * 1000 * 1000;

View File

@ -969,10 +969,13 @@ static long syz_future_time(volatile long when)
switch (when) {
case 0:
delta_ms = 5;
break;
case 1:
delta_ms = 30;
break;
default:
delta_ms = 10000;
break;
}
zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC);
return now + delta_ms * 1000 * 1000;