From c0da4d95c2b86003ebe20a7c5e88df54648411fe Mon Sep 17 00:00:00 2001 From: Yunfeng Ye Date: Sat, 26 Oct 2019 20:51:15 +0800 Subject: [PATCH 31/53] irqbalance: use isdigit() instead of the logic of character judgment Signed-off-by: Yunfeng Ye --- procinterrupts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/procinterrupts.c b/procinterrupts.c index 29b0fef..1a7ff26 100644 --- a/procinterrupts.c +++ b/procinterrupts.c @@ -182,7 +182,7 @@ GList* collect_full_irq_list() while (isblank(*(c))) c++; - if (!(*c>='0' && *c<='9')) + if (!isdigit(*c)) break; c = strchr(line, ':'); if (!c) @@ -274,7 +274,7 @@ void parse_proc_interrupts(void) while (isblank(*(c))) c++; - if (!(*c>='0' && *c<='9')) + if (!isdigit(*c)) break; c = strchr(line, ':'); if (!c) -- 2.23.0