Skip to content
Snippets Groups Projects
Commit 00f082ec authored by Morris Jette's avatar Morris Jette
Browse files

Initialize a variable in acct_gather_energy/rapl plugin

parent dc2dfe90
No related branches found
No related tags found
No related merge requests found
...@@ -236,7 +236,7 @@ static void _hardware(void) ...@@ -236,7 +236,7 @@ static void _hardware(void)
{ {
char buf[1024]; char buf[1024];
FILE *fd; FILE *fd;
int cpu, pkg; int cpu = 0, pkg = 0;
if ((fd = fopen("/proc/cpuinfo", "r")) == 0) if ((fd = fopen("/proc/cpuinfo", "r")) == 0)
fatal("RAPL: error on attempt to open /proc/cpuinfo"); fatal("RAPL: error on attempt to open /proc/cpuinfo");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment