From: Ulrich Drepper Date: Fri, 22 Jun 2007 22:13:52 +0000 (+0000) Subject: (pthread_getattr_np): Clear cpuset and cpusetsize if pthread_getaffinity_np failed... X-Git-Tag: cvs/glibc-2_6_1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a28876d013accb785592925a13160b6ef7d4fa60;p=thirdparty%2Fglibc.git (pthread_getattr_np): Clear cpuset and cpusetsize if pthread_getaffinity_np failed with ENOSYS. --- diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c index 9c0e4ed8666..87cf56482f3 100644 --- a/nptl/pthread_getattr_np.c +++ b/nptl/pthread_getattr_np.c @@ -164,8 +164,12 @@ pthread_getattr_np (thread_id, attr) { free (cpuset); if (ret == ENOSYS) - /* There is no such functionality. */ - ret = 0; + { + /* There is no such functionality. */ + ret = 0; + iattr->cpuset = NULL; + iattr->cpusetsize = 0; + } } }