tidying
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 30 Jul 2019 21:32:08 +0000 (22:32 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 1 Aug 2019 19:49:45 +0000 (20:49 +0100)
src/src/auths/auth-spa.c
src/src/deliver.c
src/src/exim_dbmbuild.c
src/src/mytypes.h
src/src/store.c
src/src/transports/smtp.c

index b396e3892284899190bae587bbd17e25bac89acd..fc363df6fe5119826a21eea5244de5c25abe4842 100644 (file)
@@ -1209,7 +1209,7 @@ char versionString[] = "libntlm version 0.21";
 
 #define spa_bytes_add(ptr, header, buf, count) \
 { \
-if (buf != NULL  &&  count != 0) /* we hate -Wint-in-bool-contex */ \
+if (buf && (count) != 0) /* we hate -Wint-in-bool-contex */ \
   { \
   SSVAL(&ptr->header.len,0,count); \
   SSVAL(&ptr->header.maxlen,0,count); \
index ba9572e48be0423fd267fd2b15c4e0e0e1ca3b32..05494dd8b74b52eb3c04d0e7eeb110e6d403aa18 100644 (file)
@@ -6734,7 +6734,7 @@ while (addr_new)           /* Loop until all addresses dealt with */
       (void)post_process_one(addr, DEFER, LOG_MAIN, EXIM_DTYPE_ROUTER, 0);
 
       /* For remote-retry errors (here and just above) that we've not yet
-      hit the rery time, use the error recorded in the retry database
+      hit the retry time, use the error recorded in the retry database
       as info in the warning message.  This lets us send a message even
       when we're not failing on a fresh attempt.  We assume that this
       info is not sensitive. */
@@ -8284,13 +8284,9 @@ else if (addr_defer != (address_item *)(+1))
 
         /* List the addresses, with error information if allowed */
 
-        /* store addr_defer for machine readable part */
-        address_item *addr_dsndefer = addr_defer;
         fputc('\n', f);
-        while (addr_defer)
+       for (address_item * addr = addr_defer; addr; addr = addr->next)
           {
-          address_item *addr = addr_defer;
-          addr_defer = addr->next;
           if (print_address_information(addr, f, US"  ", US"\n    ", US""))
             print_address_error(addr, f, US"Delay reason: ");
           fputc('\n', f);
@@ -8333,16 +8329,16 @@ else if (addr_defer != (address_item *)(+1))
           }
         fputc('\n', f);
 
-        for ( ; addr_dsndefer; addr_dsndefer = addr_dsndefer->next)
+       for (address_item * addr = addr_defer; addr; addr = addr->next)
           {
          host_item * hu;
 
-         print_dsn_addr_action(f, addr_dsndefer, US"delayed", US"4.0.0");
+         print_dsn_addr_action(f, addr, US"delayed", US"4.0.0");
 
-          if ((hu = addr_dsndefer->host_used) && hu->name)
+          if ((hu = addr->host_used) && hu->name)
             {
             fprintf(f, "Remote-MTA: dns; %s\n", hu->name);
-            print_dsn_diagnostic_code(addr_dsndefer, f);
+            print_dsn_diagnostic_code(addr, f);
             }
          fputc('\n', f);
           }
index 542f63cbbdeaf718653b326e104b2195f3df479d..327b46fd7115825928edb5664338a9e37670b973 100644 (file)
@@ -39,14 +39,14 @@ store_get_3(int size, BOOL tainted, const char *filename, int linenumber)
 { return NULL; }
 void **
 store_reset_3(void **ptr, int pool, const char *filename, int linenumber)
-{ }
+{ return NULL; }
 void
 store_release_above_3(void *ptr, const char *func, int linenumber)
 { }
 gstring *
 string_vformat_trc(gstring * g, const uschar * func, unsigned line,
   unsigned size_limit, unsigned flags, const char *format, va_list ap)
-{ }
+{ return NULL; }
 /******************************************************************************/
 
 
index 37b5a9ab782d53fe9ebf49e8d196c28bfad01cca..ceb9f1b5592569ecc48e5ffe484104f37c1b326a 100644 (file)
@@ -100,19 +100,19 @@ functions that are called quite often; for other calls to external libraries
 #define Uread(f,b,l)       read(f,CS(b),l)
 #define Urename(s,t)       rename(CCS(s),CCS(t))
 #define Ustat(s,t)         stat(CCS(s),t)
-#define Ustrcat(s,t)       __Ustrcat(s,t, __FUNCTION__, __LINE__)
+#define Ustrcat(s,t)       __Ustrcat(s, CUS(t), __FUNCTION__, __LINE__)
 #define Ustrchr(s,n)       US strchr(CCS(s),n)
 #define CUstrchr(s,n)      CUS strchr(CCS(s),n)
 #define CUstrerror(n)      CUS strerror(n)
 #define Ustrcmp(s,t)       strcmp(CCS(s),CCS(t))
-#define Ustrcpy(s,t)       __Ustrcpy(s,t, __FUNCTION__, __LINE__)
+#define Ustrcpy(s,t)       __Ustrcpy(s, CUS(t), __FUNCTION__, __LINE__)
 #define Ustrcpy_nt(s,t)    strcpy(CS s, CCS t)         /* no taint check */
 #define Ustrcspn(s,t)      strcspn(CCS(s),CCS(t))
 #define Ustrftime(s,m,f,t) strftime(CS(s),m,f,t)
 #define Ustrlen(s)         (int)strlen(CCS(s))
-#define Ustrncat(s,t,n)    __Ustrncat(s,t,n, __FUNCTION__, __LINE__)
+#define Ustrncat(s,t,n)    __Ustrncat(s, CUS(t),n, __FUNCTION__, __LINE__)
 #define Ustrncmp(s,t,n)    strncmp(CCS(s),CCS(t),n)
-#define Ustrncpy(s,t,n)    __Ustrncpy(s,t,n, __FUNCTION__, __LINE__)
+#define Ustrncpy(s,t,n)    __Ustrncpy(s, CUS(t),n, __FUNCTION__, __LINE__)
 #define Ustrncpy_nt(s,t,n) strncpy(CS s, CCS t, n)     /* no taint check */
 #define Ustrpbrk(s,t)      strpbrk(CCS(s),CCS(t))
 #define Ustrrchr(s,n)      US strrchr(CCS(s),n)
index 045f27f8e1218bf7ece27244ebe622f740333535..9b1a297e61ab7ecedecaf9c71cdf45b7f6ba33ab 100644 (file)
@@ -135,6 +135,7 @@ static int max_pool_malloc; /* max value for pool_malloc */
 static int max_nonpool_malloc; /* max value for nonpool_malloc */
 
 
+#ifndef COMPILE_UTILITY
 static const uschar * pooluse[NPOOLS] = {
 [POOL_MAIN] =          US"main",
 [POOL_PERM] =          US"perm",
@@ -151,6 +152,7 @@ static const uschar * poolclass[NPOOLS] = {
 [POOL_TAINT_PERM] =    US"tainted",
 [POOL_TAINT_SEARCH] =  US"tainted",
 };
+#endif
 
 
 static void * store_mmap(int, const char *, int);
index 03243f3fc7dd35258db4ef6ee323262a2a8eea7e..d90f7adf1cefe43665f128924faa0c3e25be8200 100644 (file)
@@ -1963,7 +1963,6 @@ smtp_transport_options_block * ob = sx->conn_args.tblock->options_block;
 BOOL pass_message = FALSE;
 uschar * message = NULL;
 int yield = OK;
-int rc;
 #ifndef DISABLE_TLS
 uschar * tls_errstr;
 #endif
@@ -2074,6 +2073,7 @@ if (!continue_hostname)
 
     if (sx->conn_args.host->dnssec == DS_YES)
       {
+      int rc;
       if(  sx->dane_required
        || verify_check_given_host(CUSS &ob->hosts_try_dane, sx->conn_args.host) == OK
        )