summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-03-03 18:21:41 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2016-03-03 19:15:26 +0000
commitf2cb6292ba93101c1e8eff8933df6157cfe05fd8 (patch)
treee974da6f8a5764cb62863ae232c8ecbce1a2f182
parentf9334a281c155709bd269771c11fc5bbf687c17b (diff)
tidying
-rw-r--r--src/src/host.c2
-rw-r--r--src/src/mime.c11
-rw-r--r--src/src/mime.h10
-rw-r--r--src/src/moan.c8
-rw-r--r--src/src/readconf.c4
-rw-r--r--src/src/tls-openssl.c1
6 files changed, 16 insertions, 20 deletions
diff --git a/src/src/host.c b/src/src/host.c
index 6a6e7abf8..b65168c68 100644
--- a/src/src/host.c
+++ b/src/src/host.c
@@ -1521,7 +1521,7 @@ int len;
uschar *s, *t;
struct hostent *hosts;
struct in_addr addr;
-unsigned long time_msec;
+unsigned long time_msec = 0; /* init to quieten dumb static analysis */
if (slow_lookup_log) time_msec = get_time_in_ms();
diff --git a/src/src/mime.c b/src/src/mime.c
index 7b1fa387d..6a64b26b1 100644
--- a/src/src/mime.c
+++ b/src/src/mime.c
@@ -12,7 +12,16 @@
FILE *mime_stream = NULL;
uschar *mime_current_boundary = NULL;
-static int mime_header_list_size = sizeof(mime_header_list)/sizeof(mime_header);
+
+static mime_header mime_header_list[] = {
+ { US"content-type:", 13, &mime_content_type },
+ { US"content-disposition:", 20, &mime_content_disposition },
+ { US"content-transfer-encoding:", 26, &mime_content_transfer_encoding },
+ { US"content-id:", 11, &mime_content_id },
+ { US"content-description:", 20, &mime_content_description }
+};
+
+static int mime_header_list_size = nelem(mime_header_list);
static mime_parameter mime_parameter_list[] = {
{ US"name=", 5, &mime_filename },
diff --git a/src/src/mime.h b/src/src/mime.h
index 5c030ebca..8dfdf5554 100644
--- a/src/src/mime.h
+++ b/src/src/mime.h
@@ -27,16 +27,6 @@ typedef struct mime_header {
uschar ** value;
} mime_header;
-static mime_header mime_header_list[] = {
- { US"content-type:", 13, &mime_content_type },
- { US"content-disposition:", 20, &mime_content_disposition },
- { US"content-transfer-encoding:", 26, &mime_content_transfer_encoding },
- { US"content-id:", 11, &mime_content_id },
- { US"content-description:", 20, &mime_content_description }
-};
-
-
-
typedef struct mime_parameter {
uschar * name;
diff --git a/src/src/moan.c b/src/src/moan.c
index 7d1a2c681..3a490028b 100644
--- a/src/src/moan.c
+++ b/src/src/moan.c
@@ -279,14 +279,12 @@ if (bounce_return_message)
if (bounce_return_body && message_file)
{
- int ch;
- enum {midline, beginline, haddot} state = beginline;
BOOL enddot = dot_ends && message_file == stdin;
uschar * buf = store_get(bounce_return_linesize_limit+2);
if (firstline) fprintf(f, "%s", CS firstline);
- while (fgets(buf, bounce_return_linesize_limit+2, message_file))
+ while (fgets(CS buf, bounce_return_linesize_limit+2, message_file))
{
int len;
@@ -306,11 +304,11 @@ if (bounce_return_message)
if (size_limit > 0 && len > size_limit - written)
{
buf[size_limit - written] = '\0';
- fputs(buf, f);
+ fputs(CS buf, f);
break;
}
- fputs(buf, f);
+ fputs(CS buf, f);
}
}
#ifdef EXPERIMENTAL_DMARC
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 1119651f0..7396c8bd9 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -2709,15 +2709,13 @@ if (type == NULL)
if (environ)
{
uschar **p;
- size_t n;
for (p = USS environ; *p; p++) ;
- n = p - USS environ;
qsort(environ, p - USS environ, sizeof(*p), string_compare_by_pointer);
for (p = USS environ; *p; p++)
{
if (no_labels) *(Ustrchr(*p, '=')) = '\0';
- puts(*p);
+ puts(CS *p);
}
}
return;
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 83594c973..ca687a632 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -266,6 +266,7 @@ DEBUG(D_tls) debug_printf("Generating %d bit RSA key...\n", keylength);
#ifdef EXIM_HAVE_RSA_GENKEY_EX
if ( !BN_set_word(bn, (unsigned long)RSA_F4)
+ || !(rsa_key = RSA_new())
|| !RSA_generate_key_ex(rsa_key, keylength, bn, NULL)
)
#else