[exim-cvs] tidying

Página Inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] tidying
Gitweb: https://git.exim.org/exim.git/commitdiff/d23b36cd691de33b709eae04f6f100272a8081eb
Commit:     d23b36cd691de33b709eae04f6f100272a8081eb
Parent:     e34d3c68f457d4ca8238a604aff4bfe8727ebe0d
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Jan 15 22:08:48 2023 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Jan 15 22:08:48 2023 +0000


    tidying
---
 src/src/expand.c      | 18 +++++++++---------
 src/src/filter.c      |  4 ++--
 src/src/priv.c        |  2 +-
 src/src/regex_cache.c |  2 +-
 src/src/spool_in.c    | 13 ++++++++-----
 src/src/tls.c         |  9 ++++-----
 6 files changed, 25 insertions(+), 23 deletions(-)


diff --git a/src/src/expand.c b/src/src/expand.c
index 62b4a1890..2949579c5 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -23,16 +23,18 @@ typedef unsigned esi_flags;
 #define ESI_HONOR_DOLLAR    BIT(1)    /* $ is meaningfull */
 #define ESI_SKIPPING        BIT(2)    /* value will not be needed */


+#ifdef STAND_ALONE
+# ifndef SUPPORT_CRYPTEQ
+# define SUPPORT_CRYPTEQ
+# endif
+#else
+
/* Recursively called function */

static uschar *expand_string_internal(const uschar *, esi_flags, const uschar **, BOOL *, BOOL *);
static int_eximarith_t expanded_string_integer(const uschar *, BOOL);

-#ifdef STAND_ALONE
-# ifndef SUPPORT_CRYPTEQ
-#  define SUPPORT_CRYPTEQ
-# endif
-#endif
+#endif    /*!STAND_ALONE*/


#ifdef LOOKUP_LDAP
# include "lookups/ldap.h"
@@ -835,8 +837,6 @@ static var_entry var_table[] = {
{ "warnmsg_recipients", vtype_stringptr, &warnmsg_recipients }
};

-static int var_table_size = nelem(var_table);
-
#ifdef MACRO_PREDEF

/* dummies */
@@ -1278,7 +1278,7 @@ static var_entry *
find_var_ent(uschar * name)
{
int first = 0;
-int last = var_table_size;
+int last = nelem(var_table);

while (last > first)
{
@@ -8806,7 +8806,7 @@ for (int i = 0; i < REGEX_VARS; i++) if (regex_vars[i])
#endif

 /* check known-name variables */
-for (var_entry * v = var_table; v < var_table + var_table_size; v++)
+for (var_entry * v = var_table; v < var_table + nelem(var_table); v++)
   if (v->type == vtype_stringptr)
     assert_variable_notin(US v->name, *(USS v->value), &e);


diff --git a/src/src/filter.c b/src/src/filter.c
index 530d772b3..d878acb8f 100644
--- a/src/src/filter.c
+++ b/src/src/filter.c
@@ -671,8 +671,8 @@ for (;;)
       {
 //      if (toplevel) *saveptr = 0;
 //      else
-   if (!toplevel)
-      *error_pointer = string_sprintf("missing \")\" at end of "
+      if (!toplevel)
+        *error_pointer = string_sprintf("missing \")\" at end of "
           "condition near line %d of filter file", line_number);
       break;
       }
diff --git a/src/src/priv.c b/src/src/priv.c
index 3a100cd9e..9305f8b45 100644
--- a/src/src/priv.c
+++ b/src/src/priv.c
@@ -1,4 +1,4 @@
-/* Copyright (c)  The Exim Maintainers 2022 *
+/* Copyright (c)  The Exim Maintainers 2022 */
 /* SPDX-License-Identifier: GPL-2.0-or-later */


#include "exim.h"
diff --git a/src/src/regex_cache.c b/src/src/regex_cache.c
index a9b482174..1ca3c96d5 100644
--- a/src/src/regex_cache.c
+++ b/src/src/regex_cache.c
@@ -239,7 +239,7 @@ regex_at_daemon(const uschar * reqbuf)
{
const re_req * req = (const re_req *)reqbuf;
uschar * errstr;
-const pcre2_code * cre;
+const pcre2_code * cre = NULL;

 if (regex_cachesize >= REGEX_CACHESIZE_LIMIT)
   errstr = US"regex cache size limit reached";
diff --git a/src/src/spool_in.c b/src/src/spool_in.c
index e785f695b..1291197de 100644
--- a/src/src/spool_in.c
+++ b/src/src/spool_in.c
@@ -496,15 +496,18 @@ for (;;)
   if (*var == '(')                /* marker for quoted value */
     {
     uschar * s;
-    int idx;
     for (s = ++var; *s != ')'; ) s++;
 #ifndef COMPILE_UTILITY
-    if ((idx = search_findtype(var, s - var)) < 0)
       {
-      DEBUG(D_any) debug_printf("Unrecognised quoter %.*s\n", (int)(s - var), var+1);
-      goto SPOOL_FORMAT_ERROR;
+      int idx;
+      if ((idx = search_findtype(var, s - var)) < 0)
+    {
+    DEBUG(D_any)
+      debug_printf("Unrecognised quoter %.*s\n", (int)(s - var), var+1);
+    goto SPOOL_FORMAT_ERROR;
+    }
+      proto_mem = store_get_quoted(1, GET_TAINTED, idx);
       }
-    proto_mem = store_get_quoted(1, GET_TAINTED, idx);
 #endif  /* COMPILE_UTILITY */
     var = s + 1;
     }
diff --git a/src/src/tls.c b/src/src/tls.c
index f7be5293d..ba7c2de38 100644
--- a/src/src/tls.c
+++ b/src/src/tls.c
@@ -26,11 +26,6 @@ functions from the OpenSSL or GNU TLS libraries. */
 #endif



-/* Forward decl. */
-static void tls_client_resmption_key(tls_support *, smtp_connect_args *,
-  smtp_transport_options_block *);
-
-
 #if defined(MACRO_PREDEF) && !defined(DISABLE_TLS)
 # include "macro_predef.h"
 # ifdef USE_GNUTLS
@@ -459,6 +454,10 @@ tzset();
 /*************************************************
 *        Many functions are package-specific     *
 *************************************************/
+/* Forward decl. */
+static void tls_client_resmption_key(tls_support *, smtp_connect_args *,
+  smtp_transport_options_block *);
+


#ifdef USE_GNUTLS
# include "tls-gnu.c"