From c7413ee8591e3b74e7b825ae052c72e50966e1b6 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Tue, 19 Apr 2022 17:03:00 +0800 Subject: [PATCH] system/critmon: Fix dead code Remove branch since errcount could never bigger than 100. Signed-off-by: Huang Qi --- system/critmon/critmon.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/critmon/critmon.c b/system/critmon/critmon.c index c3d60fa79..c5a448ad7 100644 --- a/system/critmon/critmon.c +++ b/system/critmon/critmon.c @@ -423,12 +423,7 @@ static int critmon_list_once(void) fprintf(stderr, "Csection Monitor: Failed to open directory: %s\n", CONFIG_SYSTEM_CRITMONITOR_MOUNTPOINT); - - if (++errcount > 100) - { - fprintf(stderr, "Csection Monitor: Too many errors ... exiting\n"); - return EXIT_FAILURE; - } + return EXIT_FAILURE; } /* Read each directory entry */