mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
012b86a0b6
commit
9ddabae6e7
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue