Minor change to last PR: errno should not be modified if no error occurred.
This commit is contained in:
parent
1dfed49a3c
commit
baf4c0d011
@ -156,8 +156,14 @@ int sched_setaffinity(pid_t pid, size_t cpusetsize, FAR const cpu_set_t *mask)
|
|||||||
|
|
||||||
errout_with_csection:
|
errout_with_csection:
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
|
|
||||||
errout_with_lock:
|
errout_with_lock:
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
|
if (errcode != 0)
|
||||||
|
{
|
||||||
set_errno(errcode);
|
set_errno(errcode);
|
||||||
return errcode ? ERROR : OK;
|
return ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user