diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-08-14 22:46:07 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-08-14 22:46:07 +0300 |
commit | c6099bb349d2c6f1446a551fd4fdbd5b96753f7f (patch) | |
tree | 50b8f9da8c9dec2d5dc4f195c3ae3c6861eeb5a7 /src | |
parent | a64b4a0527ebde3b7e3ecc0adfb5f71ae66d2154 (diff) |
removed obsolete check; #4051
Diffstat (limited to 'src')
-rw-r--r-- | src/proc_interrupts.c | 6 | ||||
-rw-r--r-- | src/proc_softirqs.c | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/proc_interrupts.c b/src/proc_interrupts.c index 0698c35e39..bfd95043e5 100644 --- a/src/proc_interrupts.c +++ b/src/proc_interrupts.c @@ -109,10 +109,6 @@ int do_proc_interrupts(int update_every, usec_t dt) { irr->id = procfile_lineword(ff, l, 0); if(unlikely(!irr->id || !irr->id[0])) continue; - size_t idlen = strlen(irr->id); - if(unlikely(idlen && irr->id[idlen - 1] == ':')) - irr->id[idlen - 1] = '\0'; - int c; for(c = 0; c < cpus ;c++) { if(likely((c + 1) < (int)words)) @@ -126,7 +122,7 @@ int do_proc_interrupts(int update_every, usec_t dt) { if(unlikely(isdigit(irr->id[0]) && (uint32_t)(cpus + 2) < words)) { strncpyz(irr->name, procfile_lineword(ff, l, words - 1), MAX_INTERRUPT_NAME); size_t nlen = strlen(irr->name); - idlen = strlen(irr->id); + size_t idlen = strlen(irr->id); if(likely(nlen + 1 + idlen <= MAX_INTERRUPT_NAME)) { irr->name[nlen] = '_'; strncpyz(&irr->name[nlen + 1], irr->id, MAX_INTERRUPT_NAME - nlen - 1); diff --git a/src/proc_softirqs.c b/src/proc_softirqs.c index 3978cf6b53..58a504be9a 100644 --- a/src/proc_softirqs.c +++ b/src/proc_softirqs.c @@ -106,10 +106,6 @@ int do_proc_softirqs(int update_every, usec_t dt) { irr->id = procfile_lineword(ff, l, 0); if(unlikely(!irr->id || !irr->id[0])) continue; - size_t idlen = strlen(irr->id); - if(unlikely(idlen && irr->id[idlen - 1] == ':')) - irr->id[idlen - 1] = '\0'; - int c; for(c = 0; c < cpus ;c++) { if(likely((c + 1) < (int)words)) |