tests: interrupt: fix coverity issue of newly added testcases
Should not use -1 as an input parameter for unsigned int. Use zero instead of -1 as invaild interrupt number to fix coverity warning. Fixes #35146 CID: 235994 Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
This commit is contained in:
parent
253350c6e7
commit
e2f6b9536c
1 changed files with 3 additions and 3 deletions
|
@ -88,8 +88,8 @@ void isr_handler(const void *param)
|
||||||
#define TRIGGER_IRQ_DYN_LINE 5
|
#define TRIGGER_IRQ_DYN_LINE 5
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define TEST_IRQ_DYN_LINE -1
|
#define TEST_IRQ_DYN_LINE 0
|
||||||
#define TRIGGER_IRQ_DYN_LINE -1
|
#define TRIGGER_IRQ_DYN_LINE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,7 +97,7 @@ void isr_handler(const void *param)
|
||||||
static void init_dyn_interrupt(void)
|
static void init_dyn_interrupt(void)
|
||||||
{
|
{
|
||||||
/* If we cannot get a dynamic interrupt, skip test. */
|
/* If we cannot get a dynamic interrupt, skip test. */
|
||||||
if (TEST_IRQ_DYN_LINE == -1) {
|
if (TEST_IRQ_DYN_LINE == 0) {
|
||||||
ztest_test_skip();
|
ztest_test_skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue