summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-05-16 17:47:53 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2015-05-16 20:16:14 +0100
commitfc362fc531e0ffc898c784e09f097327f5814289 (patch)
treef3e9df451d96c195dc71d29ac19ba1d82592521d /src
parent6f4d5ad3a1613f7d4502bb81eb3f4e875a71b0c9 (diff)
tidying
Diffstat (limited to 'src')
-rw-r--r--src/src/exim.c8
-rw-r--r--src/src/functions.h3
-rw-r--r--src/src/imap_utf7.c6
-rw-r--r--src/src/lookups/dnsdb.c4
-rw-r--r--src/src/mime.c8
-rw-r--r--src/src/spam.c7
-rw-r--r--src/src/tls-openssl.c2
-rw-r--r--src/src/transports/smtp.c1
-rw-r--r--src/src/utf8.c4
9 files changed, 18 insertions, 25 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 470d44dce..3eca43b49 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1029,11 +1029,9 @@ DEBUG(D_any) do {
utf8_version_report(f);
#endif
- for (authi = auths_available; *authi->driver_name != '\0'; ++authi) {
- if (authi->version_report) {
+ for (authi = auths_available; *authi->driver_name != '\0'; ++authi)
+ if (authi->version_report)
(*authi->version_report)(f);
- }
- }
/* PCRE_PRERELEASE is either defined and empty or a bare sequence of
characters; unless it's an ancient version of PCRE in which case it
@@ -1053,10 +1051,8 @@ DEBUG(D_any) do {
init_lookup_list();
for (i = 0; i < lookup_list_count; i++)
- {
if (lookup_list[i]->version_report)
lookup_list[i]->version_report(f);
- }
#ifdef WHITELIST_D_MACROS
fprintf(f, "WHITELIST_D_MACROS: \"%s\"\n", WHITELIST_D_MACROS);
diff --git a/src/src/functions.h b/src/src/functions.h
index 74198a52c..d720f235e 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -465,6 +465,9 @@ extern void tree_walk(tree_node *, void (*)(uschar*, uschar*, void*), void *)
#ifdef WITH_CONTENT_SCAN
extern void unspool_mbox(void);
#endif
+#ifdef EXPERIMENTAL_INTERNATIONAL
+extern void utf8_version_report(FILE *);
+#endif
extern int verify_address(address_item *, FILE *, int, int, int, int,
uschar *, uschar *, BOOL *);
diff --git a/src/src/imap_utf7.c b/src/src/imap_utf7.c
index 10cc1f7fa..b2695cdb9 100644
--- a/src/src/imap_utf7.c
+++ b/src/src/imap_utf7.c
@@ -25,7 +25,7 @@ uschar *outptr = outbuf;
iconv_t icd;
#endif
-if (!specials) specials = "";
+if (!specials) specials = US"";
/* Pass over the string. If it consists entirely of "normal" characters
(possibly with leading seps), return it as is. */
@@ -37,7 +37,7 @@ for (s = string; *s; s++)
|| *s < 0x20
|| strchr("./&", *s)
|| *s == sep
- || strchr(specials, *s)
+ || Ustrchr(specials, *s)
)
break;
}
@@ -49,7 +49,7 @@ sptr = string;
slen = Ustrlen(string);
#if HAVE_ICONV
-if ((icd = iconv_open(US"UTF-16BE", charset)) == (iconv_t)-1)
+if ((icd = iconv_open("UTF-16BE", CCS charset)) == (iconv_t)-1)
{
*error = string_sprintf(
"imapfolder: iconv_open(\"UTF-16BE\", \"%s\") failed: %s%s",
diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c
index d06455e61..2e6805dc9 100644
--- a/src/src/lookups/dnsdb.c
+++ b/src/src/lookups/dnsdb.c
@@ -230,7 +230,7 @@ for (;;)
else if (strncmpic(keystring, US"retry_", 6) == 0)
{
int retries;
- if ((retries = (int)strtol(keystring + 6, CSS &keystring, 0)) < 0)
+ if ((retries = (int)strtol(CCS keystring + 6, CSS &keystring, 0)) < 0)
{
*errmsg = US"unsupported dnsdb retry count";
return DEFER;
@@ -548,7 +548,7 @@ while ((domain = string_nextinlist(&keystring, &sep, NULL, 0)))
p += rc;
GETLONG(serial, p); GETLONG(refresh, p);
GETLONG(retry, p); GETLONG(expire, p); GETLONG(minimum, p);
- sprintf(CS s, "%c%d%c%d%c%d%c%d%c%d",
+ sprintf(CS s, "%c%lu%c%lu%c%lu%c%lu%c%lu",
*outsep2, serial, *outsep2, refresh,
*outsep2, retry, *outsep2, expire, *outsep2, minimum);
yield = string_cat(yield, &size, &ptr, s, Ustrlen(s));
diff --git a/src/src/mime.c b/src/src/mime.c
index 6bffa7897..e1ff98b93 100644
--- a/src/src/mime.c
+++ b/src/src/mime.c
@@ -640,8 +640,6 @@ while(1)
mh < mime_header_list + mime_header_list_size;
mh++) if (strncmpic(mh->name, header, mh->namelen) == 0)
{
- uschar * header_value = NULL;
- int header_value_len = 0;
uschar * p = header + mh->namelen;
uschar * q;
@@ -671,8 +669,8 @@ while(1)
DEBUG(D_acl) debug_printf(" considering paramlist '%s'\n", p);
if ( !mime_filename
- && strncmpic("content-disposition:", header, 20) == 0
- && strncmpic("filename*", p, 9) == 0
+ && strncmpic(CUS"content-disposition:", header, 20) == 0
+ && strncmpic(CUS"filename*", p, 9) == 0
)
{ /* RFC 2231 filename */
uschar * q;
@@ -765,7 +763,7 @@ while(1)
if (*p) p++;
} /* param scan on line */
- if (strncmpic("content-disposition:", header, 20) == 0)
+ if (strncmpic(CUS"content-disposition:", header, 20) == 0)
{
if (decoding_failed) mime_filename = mime_fname_rfc2231;
diff --git a/src/src/spam.c b/src/src/spam.c
index 5bb973b4d..f7a34694b 100644
--- a/src/src/spam.c
+++ b/src/src/spam.c
@@ -38,7 +38,7 @@ return 0;
static int
-spamd_param(const uschar *param, spamd_address_container *spamd)
+spamd_param(const uschar * param, spamd_address_container * spamd)
{
static int timesinceday = -1;
const uschar * s;
@@ -46,10 +46,10 @@ const uschar * name;
/*XXX more clever parsing could discard embedded spaces? */
-if (sscanf(param, "pri=%u", &spamd->priority))
+if (sscanf(CCS param, "pri=%u", &spamd->priority))
return 0; /* OK */
-if (sscanf(param, "weight=%u", &spamd->weight))
+if (sscanf(CCS param, "weight=%u", &spamd->weight))
{
if (spamd->weight == 0) /* this server disabled: skip it */
return 1;
@@ -202,7 +202,6 @@ uschar *p,*q;
int override = 0;
time_t start;
size_t read, wrote;
-struct sockaddr_un server;
#ifndef NO_POLL_H
struct pollfd pollfd;
#else /* Patch posted by Erik ? for OS X */
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 530266d36..64e2fb061 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -465,7 +465,6 @@ X509 * cert = X509_STORE_CTX_get_current_cert(x509ctx);
uschar dn[256];
#ifdef EXPERIMENTAL_EVENT
int depth = X509_STORE_CTX_get_error_depth(x509ctx);
-uschar * yield;
BOOL dummy_called, optional = FALSE;
#endif
@@ -1534,7 +1533,6 @@ tls_server_start(const uschar *require_ciphers)
int rc;
uschar *expciphers;
tls_ext_ctx_cb *cbinfo;
-X509 * peercert;
static uschar peerdn[256];
static uschar cipherbuf[256];
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 7537e6e4b..9554652ca 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1388,7 +1388,6 @@ uschar *p;
uschar buffer[4096];
uschar inbuffer[4096];
uschar outbuffer[4096];
-address_item * current_address;
suppress_tls = suppress_tls; /* stop compiler warning when no TLS support */
diff --git a/src/src/utf8.c b/src/src/utf8.c
index 738220559..a0ec00391 100644
--- a/src/src/utf8.c
+++ b/src/src/utf8.c
@@ -89,7 +89,7 @@ res = store_get(p_len+5);
res[0] = 'x'; res[1] = 'n'; res[2] = res[3] = '-';
-if ((rc = punycode_encode(ucs4_len, p, NULL, &p_len, res+4)) != PUNYCODE_SUCCESS)
+if ((rc = punycode_encode(ucs4_len, p, NULL, &p_len, CS res+4)) != PUNYCODE_SUCCESS)
{
DEBUG(D_expand) debug_printf("l_u2a: bad '%s'\n", punycode_strerror(rc));
free(p);
@@ -106,7 +106,7 @@ return res;
uschar *
string_localpart_alabel_to_utf8(const uschar * alabel, uschar ** err)
{
-size_t p_len = strlen(alabel);
+size_t p_len = Ustrlen(alabel);
punycode_uint * p;
uschar * s;
uschar * res;