]> xenbits.xensource.com Git - libvirt.git/commitdiff
nodeinfo: Avoid forward declarations of static functions
authorPeter Krempa <pkrempa@redhat.com>
Tue, 15 Oct 2013 13:44:48 +0000 (15:44 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 4 Nov 2013 09:50:14 +0000 (10:50 +0100)
linuxNodeGetCPUStats() and linuxNodeGetMemoryStats() are static and
don't need a forward declaration.

src/nodeinfo.c

index 8d926302f72e95eea06384ec8f922b07f4f1a99f..3ce341dee837900bd45923958293aa12499a6494 100644 (file)
@@ -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;