mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Minor change to last PR: errno should not be modified if no error occurred.
This commit is contained in:
@@ -156,8 +156,14 @@ int sched_setaffinity(pid_t pid, size_t cpusetsize, FAR const cpu_set_t *mask)
|
||||
|
||||
errout_with_csection:
|
||||
leave_critical_section(flags);
|
||||
|
||||
errout_with_lock:
|
||||
sched_unlock();
|
||||
set_errno(errcode);
|
||||
return errcode ? ERROR : OK;
|
||||
if (errcode != 0)
|
||||
{
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user