From 8ed3f8bf4081f8b03dc26cb695dfc444d39fb8fe Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Sat, 29 Jul 2023 13:08:38 +0200 Subject: [PATCH] [server,shadow] fix loop increment warning --- server/shadow/shadow_subsystem_builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shadow/shadow_subsystem_builtin.c b/server/shadow/shadow_subsystem_builtin.c index b9ee9c967..627458ec0 100644 --- a/server/shadow/shadow_subsystem_builtin.c +++ b/server/shadow/shadow_subsystem_builtin.c @@ -40,9 +40,9 @@ static pfnShadowSubsystemEntry shadow_subsystem_load_static_entry(const char* na { if (!name) { - for (size_t index = 0; index < g_SubsystemCount; index++) + if (g_SubsystemCount > 0) { - const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[index]; + const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[0]; WINPR_ASSERT(cur->entry); return cur->entry;