Skip to content

Commit 9968fa0

Browse files
zdebanosraiden00pl
authored andcommitted
benchmarks/cyclictest: fix comp. warning and optargs termination
Fix reqtimeout_timer may be uninitilized. Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
1 parent df71123 commit 9968fa0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmarks/cyclictest/cyclictest.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static const struct option optargs[] =
148148
{"threads", optional_argument, 0, 't'},
149149
{"timer-device", optional_argument, 0, 'T'},
150150
{"policy", optional_argument, 0, 'y'},
151+
{0, 0, 0, 0}
151152
};
152153

153154
/****************************************************************************
@@ -525,7 +526,7 @@ static void *testthread(void *arg)
525526

526527
while (running)
527528
{
528-
/* This inicializes the stamp1.timeout field */
529+
/* This initializes the stamp1.timeout field */
529530

530531
if (config.meas_method == M_TIMER_API)
531532
{
@@ -925,7 +926,7 @@ int main(int argc, char *argv[])
925926
{
926927
reqtimeout_timer = config.interval;
927928
}
928-
else if (config.wait_method == W_NANOSLEEP)
929+
else
929930
{
930931
/* Multiply by 3 instead of 2, just to be sure */
931932

0 commit comments

Comments
 (0)