They can be deactivated with -DNDEBUG, which is why they can't contain
code which should always be run.
It seems the local implementation of USB_ASSERT doesn't honor the
CPP flags NDEBUG, this will be corrected in a later patch.
Change-Id: Iac56b09fd563f1b8c4c7be15a468a05b9cc86a18
hcd_os_nanosleep(int nanosec)
{
struct timespec nanotm;
+ int r;
DEBUG_DUMP;
/* TODO: Since it is not likely to be ever interrupted, we do not try
* to sleep for a remaining time in case of signal handling */
/* Signal handling will most likely end up with termination anyway */
- USB_ASSERT(EXIT_SUCCESS == nanosleep(&nanotm, NULL),
- "Calling nanosleep() failed");
+ r = nanosleep(&nanotm, NULL);
+ USB_ASSERT(EXIT_SUCCESS == r, "Calling nanosleep() failed");
}