lib/mem.c: fix count_numa func

If NUMA node number is not continuous, such as:
[root@localhost ~]# numactl -H
available: 4 nodes (1,3,5,7) ...
the node numbers are 1 3 5 7

Or it is not begin with 0, such as:
[root@localhost ~]# numactl -H
available: 3 nodes (1-3) ...
it's begin with 1 not 0

Under the above two cases, count_numa() will return a wrong number: 0

Signed-off-by: Zhouping Liu <zliu@redhat.com>
2 files changed