Skip to content

Commit

Permalink
parse_proc_interrupts: fix parsing interrupt counts
Browse files Browse the repository at this point in the history
The name of an interrupt chip can start with a number, stop before it.
  • Loading branch information
andreas-schwab committed Jun 27, 2022
1 parent 6c9c7f2 commit 0a82ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion procinterrupts.c
Expand Up @@ -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;
Expand Down

0 comments on commit 0a82ddd

Please sign in to comment.