|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -436,13 +436,13 @@ makeFullCounterPath(const char* const objectName,
|
436 | 436 | return NULL;
|
437 | 437 | }
|
438 | 438 |
|
439 |
| - snprintf(fullCounterPath, |
440 |
| - fullCounterPathLen, |
441 |
| - PROCESS_OBJECT_INSTANCE_COUNTER_FMT, |
442 |
| - objectName, |
443 |
| - imageName, |
444 |
| - instance, |
445 |
| - counterName); |
| 439 | + _snprintf(fullCounterPath, |
| 440 | + fullCounterPathLen, |
| 441 | + PROCESS_OBJECT_INSTANCE_COUNTER_FMT, |
| 442 | + objectName, |
| 443 | + imageName, |
| 444 | + instance, |
| 445 | + counterName); |
446 | 446 | } else {
|
447 | 447 | if (instance) {
|
448 | 448 | /*
|
@@ -472,18 +472,18 @@ makeFullCounterPath(const char* const objectName,
|
472 | 472 | }
|
473 | 473 |
|
474 | 474 | if (instance) {
|
475 |
| - snprintf(fullCounterPath, |
476 |
| - fullCounterPathLen, |
477 |
| - OBJECT_WITH_INSTANCES_COUNTER_FMT, |
478 |
| - objectName, |
479 |
| - instance, |
480 |
| - counterName); |
| 475 | + _snprintf(fullCounterPath, |
| 476 | + fullCounterPathLen, |
| 477 | + OBJECT_WITH_INSTANCES_COUNTER_FMT, |
| 478 | + objectName, |
| 479 | + instance, |
| 480 | + counterName); |
481 | 481 | } else {
|
482 |
| - snprintf(fullCounterPath, |
483 |
| - fullCounterPathLen, |
484 |
| - OBJECT_COUNTER_FMT, |
485 |
| - objectName, |
486 |
| - counterName); |
| 482 | + _snprintf(fullCounterPath, |
| 483 | + fullCounterPathLen, |
| 484 | + OBJECT_COUNTER_FMT, |
| 485 | + objectName, |
| 486 | + counterName); |
487 | 487 | }
|
488 | 488 | }
|
489 | 489 |
|
@@ -719,10 +719,10 @@ currentQueryIndexForProcess(void) {
|
719 | 719 | PDH_FMT_COUNTERVALUE counterValue;
|
720 | 720 | PDH_STATUS res;
|
721 | 721 |
|
722 |
| - snprintf(fullIDProcessCounterPath, |
723 |
| - MAX_PATH, |
724 |
| - pdhIDProcessCounterFmt, |
725 |
| - index); |
| 722 | + _snprintf(fullIDProcessCounterPath, |
| 723 | + MAX_PATH, |
| 724 | + pdhIDProcessCounterFmt, |
| 725 | + index); |
726 | 726 |
|
727 | 727 | if (addCounter(tmpQuery, fullIDProcessCounterPath, &handleCounter) != 0) {
|
728 | 728 | break;
|
@@ -1059,13 +1059,13 @@ allocateAndInitializePdhConstants() {
|
1059 | 1059 | }
|
1060 | 1060 |
|
1061 | 1061 | /* "\Process(java#%d)\ID Process" */
|
1062 |
| - snprintf(pdhIDProcessCounterFmt, |
1063 |
| - pdhIDProcessCounterFmtLen, |
1064 |
| - PROCESS_OBJECT_INSTANCE_COUNTER_FMT, |
1065 |
| - pdhLocalizedProcessObject, |
1066 |
| - pdhProcessImageName, |
1067 |
| - "%d", |
1068 |
| - pdhLocalizedIDProcessCounter); |
| 1062 | + _snprintf(pdhIDProcessCounterFmt, |
| 1063 | + pdhIDProcessCounterFmtLen, |
| 1064 | + PROCESS_OBJECT_INSTANCE_COUNTER_FMT, |
| 1065 | + pdhLocalizedProcessObject, |
| 1066 | + pdhProcessImageName, |
| 1067 | + "%d", |
| 1068 | + pdhLocalizedIDProcessCounter); |
1069 | 1069 |
|
1070 | 1070 | pdhIDProcessCounterFmt[pdhIDProcessCounterFmtLen] = '\0';
|
1071 | 1071 |
|
|
0 commit comments