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 wrap: on
line diff
--- a/src/readsock.c	Wed Oct 29 21:21:26 2008 +0100
+++ b/src/readsock.c	Thu Nov 06 09:18:38 2008 +0100
@@ -16,14 +16,15 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-/*#include "masqmail.h"*/
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <setjmp.h>
 #include <unistd.h>
 #include <ctype.h>
+
 #include "readsock.h"
+/*#include "masqmail.h"*/
 
 jmp_buf jmp_timeout;
 
@@ -80,7 +81,7 @@
 		c = fgetc(in);
 	}
 
-	buf[p] = 0;
+	buf[p] = '\0';
 
 	if (c == EOF)
 		return -1;
@@ -90,7 +91,7 @@
 	}
 
 	buf[p++] = c;  /* \n */
-	buf[p] = 0;
+	buf[p] = '\0';
 
 	return p;
 }
@@ -177,7 +178,7 @@
 		if (flags & READSOCKL_CVT_CRLF) {
 			if ((buf[p - 2] == '\r') && (buf[p - 1] == '\n')) {
 				buf[p - 2] = '\n';
-				buf[p - 1] = 0;
+				buf[p - 1] = '\0';
 				p--;
 			}
 		}