diff options
author | Dave Jones <davej@redhat.com> | 2009-12-11 12:42:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-12-11 12:42:41 -0500 |
commit | 0817ae893516bd29289da4e5d614538b9810781d (patch) | |
tree | de65cffffb4f1b065de869060413f4b9e6d1d8cb /x86info.c | |
parent | 99c162a97904043844131092b13d2007bcffa14e (diff) |
Handle non-sequential socket numbers correctly.
Diffstat (limited to 'x86info.c')
-rw-r--r-- | x86info.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -394,11 +394,10 @@ int main (int argc, char **argv) } for (i=0; i<nrCPUs; i++) { - if (sockets[i]==0) - break; if (debug == 1) printf("Socket %d: %d threads\n", i, sockets[i]); - num_sockets++; + if (sockets[i] != 0) /* only count populated sockets */ + num_sockets++; } /* Print a summary */ |