From 71b0460d111b98ffcfeb557b4dc68ce75e68538c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 6 Jun 2022 08:54:22 +0000 Subject: [PATCH] mon_tools: drop an always-true condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The d_name member of struct dirent is a statically allocated string, thus it's always non-NULL. GitHub-ID: https://github.com/ibm-s390-linux/s390-tools/pull/137 Signed-off-by: Dan Horák Acked-by: Gerald Schaefer Signed-off-by: Jan Höppner --- mon_tools/mon_procd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mon_tools/mon_procd.c b/mon_tools/mon_procd.c index aabc33ff..c4f46d87 100644 --- a/mon_tools/mon_procd.c +++ b/mon_tools/mon_procd.c @@ -859,8 +859,6 @@ static void read_tasks(void) } while ((entry = readdir(proc_dir))) { - if (!entry->d_name) - break; if (!isdigit(entry->d_name[0]) || !atoi(entry->d_name)) continue; memset(&task, 0, sizeof(struct task_t));