mon_tools: drop an always-true condition

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 <dan@danny.cz>
Acked-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Dan Horák
2022-06-06 08:54:22 +00:00
committed by Jan Höppner
parent ff62f4d425
commit 71b0460d11

View File

@@ -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));