From 9685cc368d33c8f95ae368d2661061a64248c2f5 Mon Sep 17 00:00:00 2001 From: Sean Davis <smd.seandavis@gmail.com> Date: Thu, 6 Jun 2019 23:01:41 -0400 Subject: [PATCH] Fix CID 213280: Constant variable guards dead code --- src/test-passwd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/test-passwd.c b/src/test-passwd.c index 18ad415e..b093065a 100644 --- a/src/test-passwd.c +++ b/src/test-passwd.c @@ -109,23 +109,17 @@ lock_initialization (char **nolock_reason) { to bring any other Mac program to the front, e.g., Terminal.) */ { - gboolean macos = FALSE; - #ifdef __APPLE__ /* Disable locking if *running* on Apple hardware, since we have no reliable way to determine whether the server is running on MacOS. Hopefully __APPLE__ means "MacOS" and not "Linux on Mac hardware" but I'm not really sure about that. */ - macos = TRUE; -#endif - - if (macos) { - if (nolock_reason) { - *nolock_reason = g_strdup ("Cannot lock securely on MacOS X"); - } - return FALSE; + if (nolock_reason) { + *nolock_reason = g_strdup ("Cannot lock securely on MacOS X"); } + return FALSE; +#endif } #endif /* NO_LOCKING */ -- GitLab