fix return value of pthread_getaffinity_np and pthread_setaffinity_np