Commit f4def402 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300497 (Using uninitialized element of array cpuset.__bits.)

parent 736c3b98
...@@ -678,6 +678,7 @@ static void *emulatedRF_thread(void *param) { ...@@ -678,6 +678,7 @@ static void *emulatedRF_thread(void *param) {
req.tv_sec = 0; req.tv_sec = 0;
req.tv_nsec = (numerology>0)? ((microsec * 1000L)/numerology):(microsec * 1000L)*2; req.tv_nsec = (numerology>0)? ((microsec * 1000L)/numerology):(microsec * 1000L)*2;
cpu_set_t cpuset; cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(1,&cpuset); CPU_SET(1,&cpuset);
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
int policy; int policy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment