openbsd: fix obvious bug in uv_cpu_info

`int which[]` should not be static here, as the function itself is
changing it

fix joyent/node#6878
This commit is contained in:
Fedor Indutny 2014-01-21 15:05:39 +04:00
parent 993151bc40
commit 8bc29b6f5f

View File

@ -223,7 +223,7 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
uint64_t info[CPUSTATES];
char model[512];
int numcpus = 1;
static int which[] = {CTL_HW,HW_MODEL,0};
int which[] = {CTL_HW,HW_MODEL,0};
size_t size;
int i;
uv_cpu_info_t* cpu_info;