From 9bb19526d988daf51cd27365002a29856e14c23e Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Tue, 22 Aug 2017 16:10:41 -0700 Subject: [PATCH] client: Exclude unnecessary checks Arrays are guaranteed to be initialized during the compilation time. --- client/command.c | 6 ------ client/dbus-proxy.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/client/command.c b/client/command.c index 17b2ba34..c18eb4c3 100644 --- a/client/command.c +++ b/client/command.c @@ -458,9 +458,6 @@ void command_init(void) command_families = l_queue_new(); - if (__start___command == NULL || __stop___command == NULL) - return; - for (desc = __start___command; desc < __stop___command; desc++) { if (!desc->init) continue; @@ -473,9 +470,6 @@ void command_exit(void) { struct command_family_desc *desc; - if (__start___command == NULL || __stop___command == NULL) - return; - for (desc = __start___command; desc < __stop___command; desc++) { if (!desc->exit) continue; diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c index 3a142c62..ac3f6fc5 100644 --- a/client/dbus-proxy.c +++ b/client/dbus-proxy.c @@ -649,9 +649,6 @@ bool dbus_proxy_init(void) proxy_interface_types = l_queue_new(); proxy_interfaces = l_queue_new(); - if (__start___interface == NULL || __stop___interface == NULL) - return false; - for (desc = __start___interface; desc < __stop___interface; desc++) { if (!desc->init) continue; @@ -673,9 +670,6 @@ bool dbus_proxy_exit(void) { struct interface_type_desc *desc; - if (__start___interface == NULL || __stop___interface == NULL) - return false; - for (desc = __start___interface; desc < __stop___interface; desc++) { if (!desc->exit) continue;