diff options
author | Nathan Scott <nathans@redhat.com> | 2021-07-09 12:42:36 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-07-09 12:42:36 +1000 |
commit | e7aaf79166c089dde2ffb34de7e0559c903aceae (patch) | |
tree | d0a0113d199df5b48e0aa91cb13b2c2de81a90eb /pcp/PCPDynamicMeter.c | |
parent | 9f667f2c746c6e8b7cdb300dc36bc2f705d03884 (diff) |
Remove unnecessary include files from PCPDynamicMeter.c
Also resolve a few unintended style guide transgressions
in the PCP platform code.
Diffstat (limited to 'pcp/PCPDynamicMeter.c')
-rw-r--r-- | pcp/PCPDynamicMeter.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pcp/PCPDynamicMeter.c b/pcp/PCPDynamicMeter.c index 05b71d5c..a89c1328 100644 --- a/pcp/PCPDynamicMeter.c +++ b/pcp/PCPDynamicMeter.c @@ -10,9 +10,6 @@ in the source distribution for its full text. #include "pcp/PCPDynamicMeter.h" #include <math.h> -#include <stdint.h> -#include <stdlib.h> -#include <string.h> #include "Object.h" #include "Platform.h" @@ -51,8 +48,8 @@ static PCPDynamicMetric* PCPDynamicMeter_lookupMetric(PCPDynamicMeters* meters, return metric; } -static void PCPDynamicMeter_parseMetric(PCPDynamicMeters* meters, PCPDynamicMeter* meter, const char *path, unsigned int line, char* key, char* value) { - PCPDynamicMetric *metric; +static void PCPDynamicMeter_parseMetric(PCPDynamicMeters* meters, PCPDynamicMeter* meter, const char* path, unsigned int line, char* key, char* value) { + PCPDynamicMetric* metric; char* p; if ((p = strchr(key, '.')) == NULL) @@ -109,7 +106,7 @@ static void PCPDynamicMeter_parseMetric(PCPDynamicMeters* meters, PCPDynamicMete } // Ensure a valid name for use in a PCP metric name and in htoprc -static void PCPDynamicMeter_validateMeterName(char* key, const char *path, unsigned int line) { +static void PCPDynamicMeter_validateMeterName(char* key, const char* path, unsigned int line) { char* p = key; char* end = strrchr(key, ']'); @@ -219,12 +216,12 @@ static void PCPDynamicMeter_scanDir(PCPDynamicMeters* meters, char* path) { if (!dir) return; - struct dirent *dirent; + struct dirent* dirent; while ((dirent = readdir(dir)) != NULL) { if (dirent->d_name[0] == '.') continue; - char *file = String_cat(path, dirent->d_name); + char* file = String_cat(path, dirent->d_name); PCPDynamicMeter_parseFile(meters, file); free(file); } |