static int match_numlist (long value, const struct el *restrict list)
{
int found = 0;
- if (list == NULL)
- found = 0;
- else {
+ if (list != NULL) {
int i;
for (i = list[0].num; i > 0; i--) {
- if (list[i].num == value)
+ if (list[i].num == value) {
found = 1;
+ break;
+ }
}
}
return found;
static int match_strlist (const char *restrict value, const struct el *restrict list)
{
int found = 0;
- if (list == NULL)
- found = 0;
- else {
+ if (list != NULL) {
int i;
for (i = list[0].num; i > 0; i--) {
- if (! strcmp (list[i].str, value))
+ if (! strcmp (list[i].str, value)) {
found = 1;
+ break;
+ }
}
}
return found;
{
int found = 1;
int i;
-
for (i = 0; i < NUM_NS; i++) {
if (ns_flags & (1 << i)) {
- if (task->ns[i] != ns_task->ns[i])
+ if (task->ns[i] != ns_task->ns[i]) {
found = 0;
+ break;
+ }
}
}
-
return found;
}