masqmail-0.2

diff src/readsock.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 3654c502a4df
line diff
     1.1 --- a/src/readsock.c	Wed Oct 29 21:21:26 2008 +0100
     1.2 +++ b/src/readsock.c	Thu Nov 06 09:18:38 2008 +0100
     1.3 @@ -16,14 +16,15 @@
     1.4      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     1.5  */
     1.6  
     1.7 -/*#include "masqmail.h"*/
     1.8  #include <signal.h>
     1.9  #include <stdio.h>
    1.10  #include <stdlib.h>
    1.11  #include <setjmp.h>
    1.12  #include <unistd.h>
    1.13  #include <ctype.h>
    1.14 +
    1.15  #include "readsock.h"
    1.16 +/*#include "masqmail.h"*/
    1.17  
    1.18  jmp_buf jmp_timeout;
    1.19  
    1.20 @@ -80,7 +81,7 @@
    1.21  		c = fgetc(in);
    1.22  	}
    1.23  
    1.24 -	buf[p] = 0;
    1.25 +	buf[p] = '\0';
    1.26  
    1.27  	if (c == EOF)
    1.28  		return -1;
    1.29 @@ -90,7 +91,7 @@
    1.30  	}
    1.31  
    1.32  	buf[p++] = c;  /* \n */
    1.33 -	buf[p] = 0;
    1.34 +	buf[p] = '\0';
    1.35  
    1.36  	return p;
    1.37  }
    1.38 @@ -177,7 +178,7 @@
    1.39  		if (flags & READSOCKL_CVT_CRLF) {
    1.40  			if ((buf[p - 2] == '\r') && (buf[p - 1] == '\n')) {
    1.41  				buf[p - 2] = '\n';
    1.42 -				buf[p - 1] = 0;
    1.43 +				buf[p - 1] = '\0';
    1.44  				p--;
    1.45  			}
    1.46  		}