X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fproc_interrupts.c;h=14215de68a24f497f208f72694ddffb60fe692cf;hb=a19ead105eeedcf7b01ec14a892d2e799e4dcba6;hp=c652693a7273af4174dc43264e559c04c224d787;hpb=2d07abf76ed80212bfdb924db67490d6535e98ec;p=netdata.git diff --git a/src/proc_interrupts.c b/src/proc_interrupts.c index c652693a..14215de6 100644 --- a/src/proc_interrupts.c +++ b/src/proc_interrupts.c @@ -52,7 +52,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) { return 0; // we return 0, so that we will retry to open it next time uint32_t lines = procfile_lines(ff), l; - uint32_t words = procfile_linewords(ff, 0), w; + uint32_t words = procfile_linewords(ff, 0); if(unlikely(!lines)) { error("Cannot read /proc/interrupts, zero lines reported."); @@ -61,6 +61,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) { // find how many CPUs are there if(unlikely(cpus == -1)) { + uint32_t w; cpus = 0; for(w = 0; w < words ; w++) { if(unlikely(strncmp(procfile_lineword(ff, 0, w), "CPU", 3) == 0))