fix win2003 crash
This commit is contained in:
parent
8af784d4eb
commit
7f15d07b45
|
@ -122,12 +122,9 @@ static PERF_OBJECT_TYPE *get_perf_object(sigar_t *sigar, char *counter_key,
|
||||||
* confucius say what the fuck.
|
* confucius say what the fuck.
|
||||||
*/
|
*/
|
||||||
if (object->NumInstances == PERF_NO_INSTANCES) {
|
if (object->NumInstances == PERF_NO_INSTANCES) {
|
||||||
bytes =
|
int i;
|
||||||
(block->TotalByteLength -
|
|
||||||
block->HeaderLength -
|
|
||||||
object->TotalByteLength);
|
|
||||||
|
|
||||||
for (; bytes > 0; bytes -= object->TotalByteLength) {
|
for (i=0; i<block->NumObjectTypes; i++) {
|
||||||
if (object->NumInstances != PERF_NO_INSTANCES) {
|
if (object->NumInstances != PERF_NO_INSTANCES) {
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue