Arg args[1];
#ifdef notdef
- if (ctx->text.source->Search == NULL) {
+ if (!ctx->text.source->Search) {
XBell(XtDisplay(w), 0);
return;
}
return;
}
- if (ctx->text.search== NULL) {
+ if (!ctx->text.search) {
ctx->text.search = XtNew(struct SearchAndReplace);
ctx->text.search->search_popup = CreateDialog(w, ptr, "search",
AddSearchChildren);
XtRealizeWidget(ctx->text.search->search_popup);
SetWMProtocolTranslations(ctx->text.search->search_popup);
}
- else if (*num_params > 1) {
+ else if (*num_params > 1)
XtVaSetValues(ctx->text.search->search_text, XtNstring, ptr, NULL);
- }
XtSetArg(args[0], XtNeditType,&edit_mode);
XtGetValues(ctx->text.source, args, ONE);
#if defined(USE_DB) && defined(DB_VERSION_STRING)
void
-#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
+# if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
dbfn_bdb_error_callback(const DB_ENV *dbenv, const char *pfx, const char *msg)
{
dbenv = dbenv;
-#else
+# else
dbfn_bdb_error_callback(const char *pfx, char *msg)
{
-#endif
+# endif
pfx = pfx;
log_write(0, LOG_MAIN, "Berkeley DB error: %s", msg);
}
yield = store_get(EXIM_DATUM_SIZE(result_datum), TRUE);
memcpy(yield, EXIM_DATUM_DATA(result_datum), EXIM_DATUM_SIZE(result_datum));
-if (length != NULL) *length = EXIM_DATUM_SIZE(result_datum);
+if (length) *length = EXIM_DATUM_SIZE(result_datum);
EXIM_DATUM_FREE(result_datum); /* Some DBM libs require freeing */
return yield;
*/
static void
-print_address_error(address_item *addr, FILE *f, uschar *t)
+print_address_error(address_item * addr, FILE * f, const uschar * t)
{
int count = Ustrlen(t);
-uschar *s = testflag(addr, af_pass_message) ? addr->message : NULL;
+uschar * s = testflag(addr, af_pass_message) ? addr->message : NULL;
if (!s && !(s = addr->user_message))
return;
return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
}
- /* Make a C stream out of it. */
+ /* Make a stdio stream out of it. */
if (!(message_log = fdopen(fd, "a")))
{
while (addr_new)
{
int rc;
- uschar *p;
- tree_node *tnode;
- dbdata_retry *domain_retry_record;
- dbdata_retry *address_retry_record;
+ tree_node * tnode;
+ dbdata_retry * domain_retry_record, * address_retry_record;
addr = addr_new;
addr_new = addr->next;
/* Ensure that the domain in the unique field is lower cased, because
domains are always handled caselessly. */
- p = Ustrrchr(addr->unique, '@');
- while (*p != 0) { *p = tolower(*p); p++; }
+ for (uschar * p = Ustrrchr(addr->unique, '@'); *p; p++) *p = tolower(*p);
DEBUG(D_deliver|D_route) debug_printf("unique = %s\n", addr->unique);
sigalrm_seen = FALSE;
ALARM(timeout);
- rc = connect(cctx->sock, (struct sockaddr *)(&sockun), sizeof(sockun));
+ rc = connect(cctx->sock, (struct sockaddr *) &sockun, sizeof(sockun));
ALARM_CLR(0);
if (sigalrm_seen)
{
ACL may have delayed. To handle cutthrough delivery enforce a dummy call
to get the DATA command sent. */
- if (acl_smtp_predata == NULL && cutthrough.cctx.sock < 0)
+ if (!acl_smtp_predata && cutthrough.cctx.sock < 0)
rc = OK;
else
{
uschar * tls_errstr;
#endif
+/* Many lines of clearing individual elements of *sx that used to
+be here have been replaced by a full memset to zero (de41aff051).
+There are two callers, this file and verify.c . Now we only set
+up nonzero elements. */
+
sx->conn_args.ob = ob;
sx->lmtp = strcmpic(ob->protocol, US"lmtp") == 0;
sx->smtps = strcmpic(ob->protocol, US"smtps") == 0;
-/* sx->ok = FALSE; */
sx->send_rset = TRUE;
sx->send_quit = TRUE;
sx->setting_up = TRUE;
sx->esmtp = TRUE;
-/* sx->esmtp_sent = FALSE; */
-#ifdef SUPPORT_I18N
-/* sx->utf8_needed = FALSE; */
-#endif
sx->dsn_all_lasthop = TRUE;
#ifdef SUPPORT_DANE
-/* sx->conn_args.dane = FALSE; */
sx->dane_required =
verify_check_given_host(CUSS &ob->hosts_require_dane, sx->conn_args.host) == OK;
#endif
-#ifndef DISABLE_PIPE_CONNECT
-/* sx->early_pipe_active = sx->early_pipe_ok = FALSE; */
-/* sx->ehlo_resp.cleartext_features = sx->ehlo_resp.crypted_features = 0; */
-/* sx->pending_BANNER = sx->pending_EHLO = sx->pending_MAIL = FALSE; */
-#endif
if ((sx->max_mail = sx->conn_args.tblock->connection_max_messages) == 0) sx->max_mail = 999999;
if ((sx->max_rcpt = sx->conn_args.tblock->max_addresses) == 0) sx->max_rcpt = 999999;
-/* sx->peer_offered = 0; */
-/* sx->avoid_option = 0; */
sx->igquotstr = US"";
if (!sx->helo_data) sx->helo_data = ob->helo_data;
-#ifdef EXPERIMENTAL_DSN_INFO
-/* sx->smtp_greeting = NULL; */
-/* sx->helo_response = NULL; */
-#endif
smtp_command = US"initial connection";
-/* sx->buffer[0] = '\0'; */
/* Set up the buffer for reading SMTP response packets. */
sx->outblock.buffer = sx->outbuffer;
sx->outblock.buffersize = sizeof(sx->outbuffer);
sx->outblock.ptr = sx->outbuffer;
-/* sx->outblock.cmd_count = 0; */
-/* sx->outblock.authenticating = FALSE; */
-/* sx->outblock.conn_args = NULL; */
/* Reset the parameters of a TLS session. */
memset(sx, 0, sizeof(*sx));
sx->addrlist = addrlist;
sx->conn_args.host = host;
-sx->conn_args.host_af = host_af,
+sx->conn_args.host_af = host_af;
sx->port = defport;
sx->conn_args.interface = interface;
sx->helo_data = NULL;
sx->conn_args.tblock = tblock;
-/* sx->verify = FALSE; */
gettimeofday(&sx->delivery_start, NULL);
sx->sync_addr = sx->first_addr = addrlist;