Skip to content
Browse files

tests: usb: desc_sections: Fix coverity issue

Move increment out of zassert_*().

Fixes #15770

Signed-off-by: Andrei Emeltchenko <>
  • Loading branch information...
finikorg authored and nashif committed May 17, 2019
1 parent 875d5a2 commit 6378e1e4a273702c98ede4af477f38bfda5c5212
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/subsys/usb/desc_sections/src/desc_sections.c
@@ -174,9 +174,11 @@ static void check_endpoint_allocation(struct usb_desc_header *head)
LOG_DBG("iface %u", if_descr->bInterfaceNumber);

/* Check that interfaces get correct numbers */
zassert_equal(if_descr->bInterfaceNumber, interfaces++,
zassert_equal(if_descr->bInterfaceNumber, interfaces,
"Interfaces numbering failed");


cfg_data = usb_get_cfg_data(if_descr);
zassert_not_null(cfg_data, "Check available cfg data");

0 comments on commit 6378e1e

Please sign in to comment.
You can’t perform that action at this time.