masqmail-0.2

diff src/smtp_out.c @ 15:f671821d8222

code beautifying; 0 -> \0 if appropriate
author meillo@marmaro.de
date Thu, 06 Nov 2008 09:18:38 +0100
parents 26e34ae9a3e3
children a80ebfa16cd5
line diff
     1.1 --- a/src/smtp_out.c	Wed Oct 29 21:21:26 2008 +0100
     1.2 +++ b/src/smtp_out.c	Thu Nov 06 09:18:38 2008 +0100
     1.3 @@ -168,7 +168,7 @@
     1.4  		}
     1.5  		for (i = 0; i < 4; i++)
     1.6  			code[i] = psb->buffer[buf_pos + i];
     1.7 -		code[i] = 0;
     1.8 +		code[i] = '\0';
     1.9  		psb->last_code = atoi(code);
    1.10  
    1.11  		buf_pos += len;
    1.12 @@ -223,7 +223,7 @@
    1.13  	if (*p && (*p != '\n')) {
    1.14  		while (*p && (*p != '\n') && (*p != '\r') && (q < buf + SMTP_BUF_LEN - 1))
    1.15  			*(q++) = *(p++);
    1.16 -		*q = 0;
    1.17 +		*q = '\0';
    1.18  		return g_strdup(buf);
    1.19  	}
    1.20  	return NULL;
    1.21 @@ -356,7 +356,8 @@
    1.22  	   beginning with a dot is prepended with another dot.
    1.23  	 */
    1.24  	gchar *ptr;
    1.25 -	gboolean new_line = TRUE;  /* previous versions assumed that each item was exactly one line. This is no longer the case */
    1.26 +	gboolean new_line = TRUE;  /* previous versions assumed that each item was exactly one line.
    1.27 +	                              This is no longer the case */
    1.28  
    1.29  	ptr = data;
    1.30  	while (*ptr) {
    1.31 @@ -567,7 +568,7 @@
    1.32  
    1.33  			for (i = 0; i < 16; i++)
    1.34  				sprintf(&(digest_string[i + i]), "%02x", (unsigned int) (digest[i]));
    1.35 -			digest_string[32] = 0;
    1.36 +			digest_string[32] = '\0';
    1.37  
    1.38  			DEBUG(5) debugf("digest = %s\n", digest_string);
    1.39  
    1.40 @@ -746,7 +747,8 @@
    1.41  							ok = FALSE;
    1.42  							break;
    1.43  						} else {
    1.44 -							logwrite(LOG_NOTICE, "%s == %s host=%s failed: %s", msg->uid, addr_string(rcpt), psb->remote_host, psb->buffer);
    1.45 +							logwrite(LOG_NOTICE, "%s == %s host=%s failed: %s",
    1.46 +							         msg->uid, addr_string(rcpt), psb->remote_host, psb->buffer);
    1.47  							if (psb->error == smtp_trylater) {
    1.48  								addr_mark_defered(rcpt);
    1.49  							} else {