tidying: coverity issues
[exim.git] / src / src / verify.c
index ef95394d36aeaf340c47cc6c596abbae993509b5..6c36be37151f41bc2fdd202511fb9d50fb692d4d 100644 (file)
@@ -458,7 +458,7 @@ can do it there for the non-rcpt-verify case.  For this we keep an addresscount.
             && port == cutthrough.host.port
             )
            {
-           uschar * resp;
+           uschar * resp = NULL;
 
            /* Match!  Send the RCPT TO, append the addr, set done */
            done =
@@ -485,7 +485,7 @@ can do it there for the non-rcpt-verify case.  For this we keep an addresscount.
            else
              {
              cancel_cutthrough_connection("recipient rejected");
-             if (errno == ETIMEDOUT)
+             if (!resp || errno == ETIMEDOUT)
                {
                HDEBUG(D_verify) debug_printf("SMTP timeout\n");
                }
@@ -1413,10 +1413,11 @@ return yield;
 /* Called after recipient-acl to get a cutthrough connection open when
    one was requested and a recipient-verify wasn't subsequently done.
 */
-void
+int
 open_cutthrough_connection( address_item * addr )
 {
 address_item addr2;
+int rc;
 
 /* Use a recipient-verify-callout to set up the cutthrough connection. */
 /* We must use a copy of the address for verification, because it might
@@ -1425,12 +1426,12 @@ get rewritten. */
 addr2 = *addr;
 HDEBUG(D_acl) debug_printf("----------- %s cutthrough setup ------------\n",
   rcpt_count > 1 ? "more" : "start");
-(void) verify_address(&addr2, NULL,
+rc= verify_address(&addr2, NULL,
        vopt_is_recipient | vopt_callout_recipsender | vopt_callout_no_cache,
        CUTTHROUGH_CMD_TIMEOUT, -1, -1,
        NULL, NULL, NULL);
 HDEBUG(D_acl) debug_printf("----------- end cutthrough setup ------------\n");
-return;
+return rc;
 }
 
 
@@ -3190,9 +3191,9 @@ if (iplookup)
   /* Now do the actual lookup; note that there is no search_close() because
   of the caching arrangements. */
 
-  handle = search_open(filename, search_type, 0, NULL, NULL);
-  if (handle == NULL) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s",
-    search_error_message);
+  if (!(handle = search_open(filename, search_type, 0, NULL, NULL)))
+    log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s", search_error_message);
+
   result = search_find(handle, filename, key, -1, NULL, 0, 0, NULL);
   if (valueptr != NULL) *valueptr = result;
   return (result != NULL)? OK : search_find_defer? DEFER: FAIL;