git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4b738a
)
Compiler quietening
author
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 18 Nov 2014 19:43:09 +0000
(19:43 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 18 Nov 2014 19:55:40 +0000
(19:55 +0000)
src/src/deliver.c
patch
|
blob
|
history
src/src/exim.c
patch
|
blob
|
history
src/src/smtp_in.c
patch
|
blob
|
history
src/src/spool_in.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
src/src/tlscert-gnu.c
patch
|
blob
|
history
src/src/tlscert-openssl.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
diff --git
a/src/src/deliver.c
b/src/src/deliver.c
index 27a4344c50ce0aa751c2a8cdb63895018b614381..2c0524e357984c2abfeff67b1d96956befebefd5 100644
(file)
--- a/
src/src/deliver.c
+++ b/
src/src/deliver.c
@@
-6660,14
+6660,13
@@
if (addr_senddsn != NULL)
FILE *f = fdopen(fd, "wb");
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
int topt = topt_add_return_path | topt_no_body;
FILE *f = fdopen(fd, "wb");
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
int topt = topt_add_return_path | topt_no_body;
- uschar
boundaryStr[64]
;
+ uschar
* bound
;
DEBUG(D_deliver) debug_printf("sending error message to: %s\n", sender_address);
/* build unique id for MIME boundary */
DEBUG(D_deliver) debug_printf("sending error message to: %s\n", sender_address);
/* build unique id for MIME boundary */
- snprintf(boundaryStr, sizeof(boundaryStr)-1, TIME_T_FMT "-eximdsn-%d",
- time(NULL), rand());
- DEBUG(D_deliver) debug_printf("DSN: MIME boundary: %s\n", boundaryStr);
+ bound = string_sprintf(TIME_T_FMT "-eximdsn-%d", time(NULL), rand());
+ DEBUG(D_deliver) debug_printf("DSN: MIME boundary: %s\n", bound);
if (errors_reply_to)
fprintf(f, "Reply-To: %s\n", errors_reply_to);
if (errors_reply_to)
fprintf(f, "Reply-To: %s\n", errors_reply_to);
@@
-6684,7
+6683,7
@@
if (addr_senddsn != NULL)
"This message was created automatically by mail delivery software.\n"
" ----- The following addresses had successful delivery notifications -----\n",
"This message was created automatically by mail delivery software.\n"
" ----- The following addresses had successful delivery notifications -----\n",
- qualify_domain_sender, sender_address, bound
aryStr, boundaryStr
);
+ qualify_domain_sender, sender_address, bound
, bound
);
addr_dsntmp = addr_senddsn;
while(addr_dsntmp)
addr_dsntmp = addr_senddsn;
while(addr_dsntmp)
@@
-6702,7
+6701,7
@@
if (addr_senddsn != NULL)
fprintf(f, "--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
fprintf(f, "--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
- bound
aryStr
, smtp_active_hostname);
+ bound, smtp_active_hostname);
if (dsn_envid != NULL) {
/* must be decoded from xtext: see RFC 3461:6.3a */
if (dsn_envid != NULL) {
/* must be decoded from xtext: see RFC 3461:6.3a */
@@
-6735,7
+6734,7
@@
if (addr_senddsn != NULL)
fputc('\n', f);
}
fputc('\n', f);
}
- fprintf(f, "--%s\nContent-type: text/rfc822-headers\n\n", bound
aryStr
);
+ fprintf(f, "--%s\nContent-type: text/rfc822-headers\n\n", bound);
fflush(f);
transport_filter_argv = NULL; /* Just in case */
fflush(f);
transport_filter_argv = NULL; /* Just in case */
@@
-6746,7
+6745,7
@@
if (addr_senddsn != NULL)
fflush(f);
fprintf(f,"\n");
fflush(f);
fprintf(f,"\n");
- fprintf(f,"--%s--\n", bound
aryStr
);
+ fprintf(f,"--%s--\n", bound);
fflush(f);
fclose(f);
fflush(f);
fclose(f);
@@
-6871,7
+6870,7
@@
while (addr_failed != NULL)
int max = (bounce_return_size_limit/DELIVER_IN_BUFFER_SIZE + 1) *
DELIVER_IN_BUFFER_SIZE;
#ifdef EXPERIMENTAL_DSN
int max = (bounce_return_size_limit/DELIVER_IN_BUFFER_SIZE + 1) *
DELIVER_IN_BUFFER_SIZE;
#ifdef EXPERIMENTAL_DSN
- uschar
boundaryStr[64]
;
+ uschar
* bound
;
uschar *dsnlimitmsg;
uschar *dsnnotifyhdr;
int topt;
uschar *dsnlimitmsg;
uschar *dsnnotifyhdr;
int topt;
@@
-6931,13
+6930,12
@@
while (addr_failed != NULL)
#ifdef EXPERIMENTAL_DSN
/* generate boundary string and output MIME-Headers */
#ifdef EXPERIMENTAL_DSN
/* generate boundary string and output MIME-Headers */
- snprintf(boundaryStr, sizeof(boundaryStr)-1, TIME_T_FMT "-eximdsn-%d",
- time(NULL), rand());
+ bound = string_sprintf(TIME_T_FMT "-eximdsn-%d", time(NULL), rand());
fprintf(f, "Content-Type: multipart/report;"
" report-type=delivery-status; boundary=%s\n"
"MIME-Version: 1.0\n",
fprintf(f, "Content-Type: multipart/report;"
" report-type=delivery-status; boundary=%s\n"
"MIME-Version: 1.0\n",
- bound
aryStr
);
+ bound);
#endif
/* Open a template file if one is provided. Log failure to open, but
#endif
/* Open a template file if one is provided. Log failure to open, but
@@
-6967,7
+6965,7
@@
while (addr_failed != NULL)
/* output human readable part as text/plain section */
fprintf(f, "--%s\n"
"Content-type: text/plain; charset=us-ascii\n\n",
/* output human readable part as text/plain section */
fprintf(f, "--%s\n"
"Content-type: text/plain; charset=us-ascii\n\n",
- bound
aryStr
);
+ bound);
#endif
if ((emf_text = next_emf(emf, US"intro")))
#endif
if ((emf_text = next_emf(emf, US"intro")))
@@
-7100,7
+7098,7
@@
wording. */
fprintf(f, "--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
fprintf(f, "--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
- bound
aryStr
, smtp_active_hostname);
+ bound, smtp_active_hostname);
if (dsn_envid)
{
if (dsn_envid)
{
@@
-7202,7
+7200,7
@@
wording. */
bounce_return_size_limit is always honored.
*/
bounce_return_size_limit is always honored.
*/
- fprintf(f, "\n--%s\n", bound
aryStr
);
+ fprintf(f, "\n--%s\n", bound);
dsnlimitmsg = US"X-Exim-DSN-Information: Due to administrative limits only headers are returned";
dsnnotifyhdr = NULL;
dsnlimitmsg = US"X-Exim-DSN-Information: Due to administrative limits only headers are returned";
dsnnotifyhdr = NULL;
@@
-7247,7
+7245,7
@@
wording. */
if (emf)
(void)fclose(emf);
if (emf)
(void)fclose(emf);
- fprintf(f, "\n--%s--\n", bound
aryStr
);
+ fprintf(f, "\n--%s--\n", bound);
#endif /*EXPERIMENTAL_DSN*/
/* Close the file, which should send an EOF to the child process
#endif /*EXPERIMENTAL_DSN*/
/* Close the file, which should send an EOF to the child process
@@
-7553,7
+7551,7
@@
else if (addr_defer != (address_item *)(+1))
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
#ifdef EXPERIMENTAL_DSN
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
#ifdef EXPERIMENTAL_DSN
- uschar
boundaryStr[64]
;
+ uschar
* bound
;
#endif
if (warn_message_file)
#endif
if (warn_message_file)
@@
-7577,13
+7575,12
@@
else if (addr_defer != (address_item *)(+1))
#ifdef EXPERIMENTAL_DSN
/* generated boundary string and output MIME-Headers */
#ifdef EXPERIMENTAL_DSN
/* generated boundary string and output MIME-Headers */
- snprintf(boundaryStr, sizeof(boundaryStr)-1,
- TIME_T_FMT "-eximdsn-%d", time(NULL), rand());
+ bound = string_sprintf(TIME_T_FMT "-eximdsn-%d", time(NULL), rand());
fprintf(f, "Content-Type: multipart/report;"
" report-type=delivery-status; boundary=%s\n"
"MIME-Version: 1.0\n",
fprintf(f, "Content-Type: multipart/report;"
" report-type=delivery-status; boundary=%s\n"
"MIME-Version: 1.0\n",
- bound
aryStr
);
+ bound);
#endif
if ((wmf_text = next_emf(wmf, US"header")))
#endif
if ((wmf_text = next_emf(wmf, US"header")))
@@
-7596,7
+7593,7
@@
else if (addr_defer != (address_item *)(+1))
/* output human readable part as text/plain section */
fprintf(f, "--%s\n"
"Content-type: text/plain; charset=us-ascii\n\n",
/* output human readable part as text/plain section */
fprintf(f, "--%s\n"
"Content-type: text/plain; charset=us-ascii\n\n",
- bound
aryStr
);
+ bound);
#endif
if ((wmf_text = next_emf(wmf, US"intro")))
#endif
if ((wmf_text = next_emf(wmf, US"intro")))
@@
-7673,7
+7670,7
@@
else if (addr_defer != (address_item *)(+1))
fprintf(f, "\n--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
fprintf(f, "\n--%s\n"
"Content-type: message/delivery-status\n\n"
"Reporting-MTA: dns; %s\n",
- bound
aryStr
,
+ bound,
smtp_active_hostname);
smtp_active_hostname);
@@
-7704,7
+7701,7
@@
else if (addr_defer != (address_item *)(+1))
fprintf(f, "\n--%s\n"
"Content-type: text/rfc822-headers\n\n",
fprintf(f, "\n--%s\n"
"Content-type: text/rfc822-headers\n\n",
- bound
aryStr
);
+ bound);
fflush(f);
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
fflush(f);
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
@@
-7715,7
+7712,7
@@
else if (addr_defer != (address_item *)(+1))
transport_write_message(NULL, fileno(f), topt, 0, NULL, NULL, NULL, NULL, NULL, 0);
fflush(f);
transport_write_message(NULL, fileno(f), topt, 0, NULL, NULL, NULL, NULL, NULL, 0);
fflush(f);
- fprintf(f,"\n--%s--\n", bound
aryStr
);
+ fprintf(f,"\n--%s--\n", bound);
fflush(f);
#endif /*EXPERIMENTAL_DSN*/
fflush(f);
#endif /*EXPERIMENTAL_DSN*/
diff --git
a/src/src/exim.c
b/src/src/exim.c
index 102d8504ca3df52ccf2539b8a03ab28e543d325e..32139bd339052283494d42da960c52cfa73edd27 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-2683,7
+2683,7
@@
for (i = 1; i < argc; i++)
#ifdef EXPERIMENTAL_DSN
/* -MCD: set the smtp_use_dsn flag; this indicates that the host
that exim is connected to supports the esmtp extension DSN */
#ifdef EXPERIMENTAL_DSN
/* -MCD: set the smtp_use_dsn flag; this indicates that the host
that exim is connected to supports the esmtp extension DSN */
- else if (strcmp(argrest, "CD") == 0)
+ else if (
U
strcmp(argrest, "CD") == 0)
{
smtp_use_dsn = TRUE;
break;
{
smtp_use_dsn = TRUE;
break;
diff --git
a/src/src/smtp_in.c
b/src/src/smtp_in.c
index dbaa3280c92bade08ffbdb3eadd303e85286486b..54dcaa5e58c3f6c548ff57cb60d133e66fcfae73 100644
(file)
--- a/
src/src/smtp_in.c
+++ b/
src/src/smtp_in.c
@@
-4169,18
+4169,16
@@
while (done <= 0)
if (esmtp) for(;;)
{
if (esmtp) for(;;)
{
- uschar *name, *value, *end;
- int size;
+ uschar *name, *value;
if (!extract_option(&name, &value))
if (!extract_option(&name, &value))
- {
break;
break;
- }
if (dsn_advertised && strcmpic(name, US"ORCPT") == 0)
{
/* Check whether orcpt has been already set */
if (dsn_advertised && strcmpic(name, US"ORCPT") == 0)
{
/* Check whether orcpt has been already set */
- if (orcpt != NULL) {
+ if (orcpt)
+ {
synprot_error(L_smtp_syntax_error, 501, NULL,
US"ORCPT can be specified once only");
goto COMMAND_LOOP;
synprot_error(L_smtp_syntax_error, 501, NULL,
US"ORCPT can be specified once only");
goto COMMAND_LOOP;
@@
-4192,32
+4190,39
@@
while (done <= 0)
else if (dsn_advertised && strcmpic(name, US"NOTIFY") == 0)
{
/* Check if the notify flags have been already set */
else if (dsn_advertised && strcmpic(name, US"NOTIFY") == 0)
{
/* Check if the notify flags have been already set */
- if (flags > 0) {
+ if (flags > 0)
+ {
synprot_error(L_smtp_syntax_error, 501, NULL,
US"NOTIFY can be specified once only");
goto COMMAND_LOOP;
}
synprot_error(L_smtp_syntax_error, 501, NULL,
US"NOTIFY can be specified once only");
goto COMMAND_LOOP;
}
- if (strcmpic(value, US"NEVER") == 0) flags |= rf_notify_never; else
+ if (strcmpic(value, US"NEVER") == 0)
+ flags |= rf_notify_never;
+ else
{
uschar *p = value;
while (*p != 0)
{
uschar *pp = p;
while (*pp != 0 && *pp != ',') pp++;
{
uschar *p = value;
while (*p != 0)
{
uschar *pp = p;
while (*pp != 0 && *pp != ',') pp++;
- if (*pp == ',') *pp++ = 0;
- if (strcmpic(p, US"SUCCESS") == 0) {
- DEBUG(D_receive) debug_printf("DSN: Setting notify success\n");
- flags |= rf_notify_success;
+ if (*pp == ',') *pp++ = 0;
+ if (strcmpic(p, US"SUCCESS") == 0)
+ {
+ DEBUG(D_receive) debug_printf("DSN: Setting notify success\n");
+ flags |= rf_notify_success;
}
}
- else if (strcmpic(p, US"FAILURE") == 0) {
- DEBUG(D_receive) debug_printf("DSN: Setting notify failure\n");
- flags |= rf_notify_failure;
+ else if (strcmpic(p, US"FAILURE") == 0)
+ {
+ DEBUG(D_receive) debug_printf("DSN: Setting notify failure\n");
+ flags |= rf_notify_failure;
}
}
- else if (strcmpic(p, US"DELAY") == 0) {
- DEBUG(D_receive) debug_printf("DSN: Setting notify delay\n");
- flags |= rf_notify_delay;
+ else if (strcmpic(p, US"DELAY") == 0)
+ {
+ DEBUG(D_receive) debug_printf("DSN: Setting notify delay\n");
+ flags |= rf_notify_delay;
}
}
- else {
+ else
+ {
/* Catch any strange values */
synprot_error(L_smtp_syntax_error, 501, NULL,
US"Invalid value for NOTIFY parameter");
/* Catch any strange values */
synprot_error(L_smtp_syntax_error, 501, NULL,
US"Invalid value for NOTIFY parameter");
diff --git
a/src/src/spool_in.c
b/src/src/spool_in.c
index 77d1321ec705e16e198b1ef8b417ba9abd4987f6..bd8f094d3fd6e5ba1b61c72583e13a277bc8e784 100644
(file)
--- a/
src/src/spool_in.c
+++ b/
src/src/spool_in.c
@@
-496,13
+496,9
@@
for (;;)
#ifdef EXPERIMENTAL_DSN
/* Check if the dsn flags have been set in the header file */
else if (Ustrncmp(p, "sn_ret", 6) == 0)
#ifdef EXPERIMENTAL_DSN
/* Check if the dsn flags have been set in the header file */
else if (Ustrncmp(p, "sn_ret", 6) == 0)
- {
- dsn_ret= atoi(big_buffer + 8);
- }
+ dsn_ret= atoi(CS big_buffer + 8);
else if (Ustrncmp(p, "sn_envid", 8) == 0)
else if (Ustrncmp(p, "sn_envid", 8) == 0)
- {
dsn_envid = string_copy(big_buffer + 11);
dsn_envid = string_copy(big_buffer + 11);
- }
#endif
break;
#endif
break;
diff --git
a/src/src/string.c
b/src/src/string.c
index 0f657dccaebb16499a5e40f57ce656fb2977a1b7..775709dc6a4304566e9429f1d8351cffb59b4569 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-165,7
+165,7
@@
Returns: pointer to the buffer
uschar *
string_format_size(int size, uschar *buffer)
{
uschar *
string_format_size(int size, uschar *buffer)
{
-if (size == 0) Ustrcpy(
CS
buffer, " ");
+if (size == 0) Ustrcpy(buffer, " ");
else if (size < 1024) sprintf(CS buffer, "%5d", size);
else if (size < 10*1024)
sprintf(CS buffer, "%4.1fK", (double)size / 1024.0);
else if (size < 1024) sprintf(CS buffer, "%5d", size);
else if (size < 10*1024)
sprintf(CS buffer, "%4.1fK", (double)size / 1024.0);
diff --git
a/src/src/tlscert-gnu.c
b/src/src/tlscert-gnu.c
index c0ca7c935f76610d58a960ae42fd4796e63a6881..ffe9588923f2299c51df53431dea36803a0fbcde 100644
(file)
--- a/
src/src/tlscert-gnu.c
+++ b/
src/src/tlscert-gnu.c
@@
-106,7
+106,7
@@
if (mod && Ustrcmp(mod, "int") == 0)
cp = store_get(len);
if (timestamps_utc)
{
cp = store_get(len);
if (timestamps_utc)
{
-
char * tz = to_tz(
"GMT0");
+
uschar * tz = to_tz(US
"GMT0");
len = strftime(CS cp, len, "%b %e %T %Y %Z", gmtime(&t));
restore_tz(tz);
}
len = strftime(CS cp, len, "%b %e %T %Y %Z", gmtime(&t));
restore_tz(tz);
}
diff --git
a/src/src/tlscert-openssl.c
b/src/src/tlscert-openssl.c
index 8f0fb4d918fc3a246d6c2e6ed7f32968f560763f..de6979a18b85b5b60acd8c3dde5ac72ecd37c9c8 100644
(file)
--- a/
src/src/tlscert-openssl.c
+++ b/
src/src/tlscert-openssl.c
@@
-121,7
+121,7
@@
else
struct tm tm;
struct tm * tm_p = &tm;
BOOL mod_tz;
struct tm tm;
struct tm * tm_p = &tm;
BOOL mod_tz;
-
char * tz = to_tz("GMT0");
/* need to call strptime with baseline TZ */
+
uschar * tz = to_tz(US"GMT0");
/* need to call strptime with baseline TZ */
/* Parse OpenSSL ASN1_TIME_print output. A shame there seems to
be no other interface for the times.
/* Parse OpenSSL ASN1_TIME_print output. A shame there seems to
be no other interface for the times.
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 12ae6e14d469df3c3969804a6ad1e317fb4f3f18..b932a87c49daddbd93f3a077da9d5f6051696398 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-277,7
+277,7
@@
smtp_transport_options_block smtp_transport_option_defaults = {
static int rf_list[] = {rf_notify_never, rf_notify_success,
rf_notify_failure, rf_notify_delay };
static int rf_list[] = {rf_notify_never, rf_notify_success,
rf_notify_failure, rf_notify_delay };
-static uschar *rf_names[] = {
"NEVER", "SUCCESS", "FAILURE",
"DELAY" };
+static uschar *rf_names[] = {
US"NEVER", US"SUCCESS", US"FAILURE", US
"DELAY" };
#endif
#endif
@@
-1871,12
+1871,12
@@
if ((smtp_use_dsn) && (dsn_all_lasthop == FALSE))
{
if (dsn_ret == dsn_ret_hdrs)
{
{
if (dsn_ret == dsn_ret_hdrs)
{
- strcpy(p, " RET=HDRS");
+
U
strcpy(p, " RET=HDRS");
while (*p) p++;
}
else if (dsn_ret == dsn_ret_full)
{
while (*p) p++;
}
else if (dsn_ret == dsn_ret_full)
{
- strcpy(p, " RET=FULL");
+
U
strcpy(p, " RET=FULL");
while (*p) p++;
}
if (dsn_envid != NULL)
while (*p) p++;
}
if (dsn_envid != NULL)
@@
-1973,14
+1973,14
@@
for (addr = first_addr;
{
int i;
BOOL first = TRUE;
{
int i;
BOOL first = TRUE;
- strcpy(p, " NOTIFY=");
+
U
strcpy(p, " NOTIFY=");
while (*p) p++;
for (i = 0; i < 4; i++)
if ((addr->dsn_flags & rf_list[i]) != 0)
{
if (!first) *p++ = ',';
first = FALSE;
while (*p) p++;
for (i = 0; i < 4; i++)
if ((addr->dsn_flags & rf_list[i]) != 0)
{
if (!first) *p++ = ',';
first = FALSE;
- strcpy(p, rf_names[i]);
+
U
strcpy(p, rf_names[i]);
while (*p) p++;
}
}
while (*p) p++;
}
}