parse_proc_interrupts: fix parsing interrupt counts

The name of an interrupt chip can start with a number, stop before it.
This commit is contained in:
Andreas Schwab 2022-06-27 13:43:04 +02:00
parent 6c9c7f2093
commit 0a82dddbaf

View file

@ -331,7 +331,7 @@ void parse_proc_interrupts(void)
while (1) {
uint64_t C;
C = strtoull(c, &c2, 10);
if (c==c2) /* end of numbers */
if (c==c2 || !strchr(" \t", *c2)) /* end of numbers */
break;
count += C;
c=c2;