Build: avoid compiling code for unused transports, routers, authenticators
[exim.git] / src / src / auths / plaintext.c
index 61be5867e6c35d231bfd9b41fda9fac9e58c598d..8148960473dfa622ac5af597977f22fc2d536c39 100644 (file)
@@ -2,12 +2,14 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
+/* Copyright (c) The Exim Maintainers 2020 - 2023 */
 /* Copyright (c) University of Cambridge 1995 - 2018 */
-/* Copyright (c) The Exim Maintainers 2020 - 2021 */
 /* See the file NOTICE for conditions of use and distribution. */
-/* SPDX-License-Identifier: GPL-2.0-only */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include "../exim.h"
+
+#ifdef AUTH_PLAINTEXT  /* Remainder of file */
 #include "plaintext.h"
 
 
@@ -62,9 +64,9 @@ auth_plaintext_init(auth_instance *ablock)
 {
 auth_plaintext_options_block *ob =
   (auth_plaintext_options_block *)(ablock->options_block);
-if (ablock->public_name == NULL) ablock->public_name = ablock->name;
-if (ablock->server_condition != NULL) ablock->server = TRUE;
-if (ob->client_send != NULL) ablock->client = TRUE;
+if (!ablock->public_name) ablock->public_name = ablock->name;
+if (ablock->server_condition) ablock->server = TRUE;
+if (ob->client_send) ablock->client = TRUE;
 }
 
 
@@ -176,5 +178,6 @@ while ((s = string_nextinlist(&text, &sep, NULL, 0)))
 return FAIL;
 }
 
-#endif   /*!MACRO_PREDEF*/
+#endif /*!MACRO_PREDEF*/
+#endif /*AUTH_PLAINTEST*/
 /* End of plaintext.c */