Skip to content

Commit 77bca13

Browse files
committed
stress-lockbus: initialize count and double at declaration time
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 9c426e5 commit 77bca13

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

stress-lockbus.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ static int stress_lockbus(stress_args_t *args)
219219
{
220220
uint32_t *local_buffer;
221221
double t, rate;
222-
CLOBBERED double duration;
223-
CLOBBERED double count;
222+
CLOBBERED double duration = 0.0;
223+
CLOBBERED double count = 0.0;
224224
CLOBBERED int rc = EXIT_SUCCESS;
225225
uint32_t *misaligned_ptr1;
226226
uint32_t *misaligned_ptr2;
@@ -385,8 +385,6 @@ static int stress_lockbus(stress_args_t *args)
385385
stress_sync_start_wait(args);
386386
stress_proc_state_set(args->name, STRESS_STATE_RUN);
387387

388-
duration = 0;
389-
count = 0;
390388
do {
391389
uint32_t *ptr0 = stress_mwc1() ?
392390
local_buffer + (stress_mwc32modn(lockbus_buffer_size - CHUNK_SIZE) >> 2) :

0 commit comments

Comments
 (0)