mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
nodeinfo: Avoid forward declarations of static functions
linuxNodeGetCPUStats() and linuxNodeGetMemoryStats() are static and don't need a forward declaration.
This commit is contained in:
parent
f8ee8fe3f9
commit
0ce5d94636
@ -121,15 +121,6 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
||||
const char *sysfs_dir,
|
||||
virNodeInfoPtr nodeinfo);
|
||||
|
||||
static int linuxNodeGetCPUStats(FILE *procstat,
|
||||
int cpuNum,
|
||||
virNodeCPUStatsPtr params,
|
||||
int *nparams);
|
||||
static int linuxNodeGetMemoryStats(FILE *meminfo,
|
||||
int cellNum,
|
||||
virNodeMemoryStatsPtr params,
|
||||
int *nparams);
|
||||
|
||||
/* Return the positive decimal contents of the given
|
||||
* DIR/cpu%u/FILE, or -1 on error. If DEFAULT_VALUE is non-negative
|
||||
* and the file could not be found, return that instead of an error;
|
||||
@ -617,10 +608,11 @@ cleanup:
|
||||
|
||||
# define TICK_TO_NSEC (1000ull * 1000ull * 1000ull / sysconf(_SC_CLK_TCK))
|
||||
|
||||
int linuxNodeGetCPUStats(FILE *procstat,
|
||||
int cpuNum,
|
||||
virNodeCPUStatsPtr params,
|
||||
int *nparams)
|
||||
static int
|
||||
linuxNodeGetCPUStats(FILE *procstat,
|
||||
int cpuNum,
|
||||
virNodeCPUStatsPtr params,
|
||||
int *nparams)
|
||||
{
|
||||
int ret = -1;
|
||||
char line[1024];
|
||||
@ -720,10 +712,11 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int linuxNodeGetMemoryStats(FILE *meminfo,
|
||||
int cellNum,
|
||||
virNodeMemoryStatsPtr params,
|
||||
int *nparams)
|
||||
static int
|
||||
linuxNodeGetMemoryStats(FILE *meminfo,
|
||||
int cellNum,
|
||||
virNodeMemoryStatsPtr params,
|
||||
int *nparams)
|
||||
{
|
||||
int ret = -1;
|
||||
size_t i = 0, j = 0, k = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user