masqmail

changeset 371:f122535c589e

Refactoring: early failure exit.
author markus schnalke <meillo@marmaro.de>
date Tue, 25 Oct 2011 13:51:43 +0200
parents d86d7b4b8995
children b0708fac99dd
files src/smtp_out.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/src/smtp_out.c	Tue Oct 25 13:50:27 2011 +0200
     1.2 +++ b/src/smtp_out.c	Tue Oct 25 13:51:43 2011 +0200
     1.3 @@ -519,14 +519,13 @@
     1.4  	DEBUG(5) debugf("smtp_out_open_child entered, cmd = %s\n", cmd);
     1.5  	psb->remote_host = host;
     1.6  	sock = child(cmd);
     1.7 -	if (sock > 0) {
     1.8 -		psb = create_smtpbase(sock);
     1.9 -		psb->remote_host = NULL;
    1.10 +	if (sock <= 0) {
    1.11 +		return NULL;
    1.12 +	}
    1.13 +	psb = create_smtpbase(sock);
    1.14 +	psb->remote_host = NULL;
    1.15  
    1.16 -		return psb;
    1.17 -	}
    1.18 -
    1.19 -	return NULL;
    1.20 +	return psb;
    1.21  }
    1.22  
    1.23  gboolean