From 3e9e96f6718b13c069138fb40f24f065ac03c6b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Sep 2017 18:33:09 +0300 Subject: unneeded calls of DestroyServiceFunction() removed --- plugins/AutoShutdown/src/watcher.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/AutoShutdown/src/watcher.cpp') diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 791278c898..d5422b632f 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -32,7 +32,6 @@ static HANDLE hHookSettingChanged; /* Weather Shutdown */ static HANDLE hHookWeatherUpdated; /* Services */ -static HANDLE hServiceStartWatcher, hServiceStopWatcher, hServiceIsEnabled; static HANDLE hEventWatcherChanged; /* Misc */ static HANDLE hHookModulesLoaded; @@ -342,9 +341,9 @@ void InitWatcher(void) hHookWeatherUpdated = NULL; /* Services */ hEventWatcherChanged = CreateHookableEvent(ME_AUTOSHUTDOWN_WATCHERCHANGED); - hServiceStartWatcher = CreateServiceFunction(MS_AUTOSHUTDOWN_STARTWATCHER, ServiceStartWatcher); - hServiceStopWatcher = CreateServiceFunction(MS_AUTOSHUTDOWN_STOPWATCHER, ServiceStopWatcher); - hServiceIsEnabled = CreateServiceFunction(MS_AUTOSHUTDOWN_ISWATCHERENABLED, ServiceIsWatcherEnabled); + CreateServiceFunction(MS_AUTOSHUTDOWN_STARTWATCHER, ServiceStartWatcher); + CreateServiceFunction(MS_AUTOSHUTDOWN_STOPWATCHER, ServiceStopWatcher); + CreateServiceFunction(MS_AUTOSHUTDOWN_ISWATCHERENABLED, ServiceIsWatcherEnabled); } void UninitWatcher(void) @@ -366,9 +365,6 @@ void UninitWatcher(void) /* Weather Shutdown */ UnhookEvent(hHookWeatherUpdated); /* does NULL check */ /* Services */ - DestroyServiceFunction(hServiceStartWatcher); - DestroyServiceFunction(hServiceStopWatcher); - DestroyServiceFunction(hServiceIsEnabled); DestroyHookableEvent(hEventWatcherChanged); /* Misc */ UnhookEvent(hHookModulesLoaded); -- cgit v1.2.3