Skip to content

Minor redundancy cleanup from static analysis warnings #819

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
Two minor redundant logic/checks:

for (signo = SIGRTMIN; signo <= SIGRTMAX; ++signo)
{
if (!sigismember(&inuse, signo))
{
/* signal is available, stop search */
break;
}
}
if (signo < SIGRTMIN || signo > SIGRTMAX)
{
/* no available signal for timer */
OS_DEBUG("No free RT signals to use for simulated time base\n");
return_code = OS_TIMER_ERR_UNAVAILABLE;
}

status = OS_SUCCESS;

No actual issues, just minor cleanup.

Describe the solution you'd like
Remove first, refactor second so the bound is just checked in one place

Describe alternatives you've considered
None

Additional context
Static analysis warnings

Requester Info
Jacob Hageman - NASA

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions