mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
When iterating over CPU bitmask, don't try more than CPU_SETSIZE.
This commit is contained in:
parent
7ed520bd85
commit
395a37e379
@ -1,5 +1,8 @@
|
||||
2009-06-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #10183]
|
||||
* posix/tst-cpucount.c: Don't try more than CPU_SETSIZE bits.
|
||||
|
||||
[BZ #10195]
|
||||
* inet/netinet/icmp6.h (struct nd_opt_home_agent_info): Change type
|
||||
of nd_opt_home_agent_info_preference to uint16_t.
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
static int
|
||||
do_test (void)
|
||||
@ -8,7 +9,7 @@ do_test (void)
|
||||
|
||||
CPU_ZERO (&c);
|
||||
|
||||
for (int cnt = 0; cnt < 130; ++cnt)
|
||||
for (int cnt = 0; cnt < MIN (CPU_SETSIZE, 130); ++cnt)
|
||||
{
|
||||
int n = CPU_COUNT (&c);
|
||||
if (n != cnt)
|
||||
|
Loading…
Reference in New Issue
Block a user