aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <colomar.6.4.3@gmail.com>2020-09-03 21:53:12 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-09-05 14:49:42 +0200
commit9ddabae6e79005a68dadd21dea9f305615de86d5 (patch)
treea8f462065a27e4a006c1002849c7927035840d01 /man3
parent012b86a0b67fc182c35ab0c8580f47b07a0993ac (diff)
downloadman-pages-9ddabae6e79005a68dadd21dea9f305615de86d5.tar.gz
pthread_setaffinity_np.3: Use sizeof consistently
Use ``sizeof`` consistently through all the examples in the following way: - Use the name of the variable instead of its type as argument for ``sizeof``. Rationale: https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/pthread_setaffinity_np.34
1 files changed, 2 insertions, 2 deletions
diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3
index 24499f550c..57aaf12515 100644
--- a/man3/pthread_setaffinity_np.3
+++ b/man3/pthread_setaffinity_np.3
@@ -194,13 +194,13 @@ main(int argc, char *argv[])
for (j = 0; j < 8; j++)
CPU_SET(j, &cpuset);
- s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
+ s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
if (s != 0)
handle_error_en(s, "pthread_setaffinity_np");
/* Check the actual affinity mask assigned to the thread */
- s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
+ s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);
if (s != 0)
handle_error_en(s, "pthread_getaffinity_np");