changeset 14:a8f3424347dc

replaced number 0 with character \0 where appropriate
author meillo@marmaro.de
date Wed, 29 Oct 2008 21:21:26 +0100 (2008-10-29)
parents 49dab67fe461
children f671821d8222
files src/accept.c src/address.c src/alias.c src/conf.c
diffstat 4 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/accept.c	Wed Oct 29 21:10:18 2008 +0100
+++ b/src/accept.c	Wed Oct 29 21:21:26 2008 +0100
@@ -34,7 +34,7 @@
 {
 	static gchar base62_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 	gchar *p = res + len;
-	*p = 0;
+	*p = '\0';
 	while (p > res) {
 		*(--p) = base62_chars[value % 62];
 		value /= 62;
@@ -73,7 +73,7 @@
 	gint line_cnt = 0, data_size = 0;
 
 	line = g_malloc(line_size);
-	line[0] = 0;
+	line[0] = '\0';
 
 	while (TRUE) {
 		int len = read_sockline1(in, &line, &line_size, 5 * 60, READSOCKL_CVT_CRLF);
@@ -95,7 +95,7 @@
 				if (len1 > 0) {  /* == 0 is 'normal' (EOF after a CR) */
 					if (line1[len1 - 1] != '\n') {  /* some mail clients allow unterminated lines */
 						line1[len1] = '\n';
-						line1[len1 + 1] = 0;
+						line1[len1 + 1] = '\0';
 						msg->data_list = g_list_prepend(msg->data_list, g_strdup(line1));
 						data_size += strlen(line1);
 						line_cnt++;
--- a/src/address.c	Wed Oct 29 21:10:18 2008 +0100
+++ b/src/address.c	Wed Oct 29 21:21:26 2008 +0100
@@ -177,7 +177,7 @@
 	if (buffer)
 		g_free(buffer);
 
-	if (addr->local_part[0] == 0) {
+	if (addr->local_part[0] == '\0') {
 		buffer = g_strdup("<>");
 	} else {
 		buffer = g_strdup_printf("<%s@%s>", addr->local_part ? addr->local_part : "", addr->domain ? addr->domain : "");
--- a/src/alias.c	Wed Oct 29 21:10:18 2008 +0100
+++ b/src/alias.c	Wed Oct 29 21:21:26 2008 +0100
@@ -67,14 +67,14 @@
 	gchar *p, *q;
 
 	p = line;
-	while (*p != 0) {
+	while (*p != '\0') {
 		q = buf;
 		while (isspace(*p))
 			p++;
 		if (*p != '\"') {
 			while (*p && (*p != ',') && (q < buf + 255))
 				*(q++) = *(p++);
-			*q = 0;
+			*q = '\0';
 		} else {
 			gboolean escape = FALSE;
 			p++;
@@ -87,7 +87,7 @@
 				}
 				p++;
 			}
-			*q = 0;
+			*q = '\0';
 			while (*p && (*p != ','))
 				p++;
 		}
--- a/src/conf.c	Wed Oct 29 21:10:18 2008 +0100
+++ b/src/conf.c	Wed Oct 29 21:21:26 2008 +0100
@@ -118,12 +118,12 @@
 	DEBUG(6) fprintf(stderr, "parsing list %s\n", line);
 
 	p = line;
-	while (*p != 0) {
+	while (*p != '\0') {
 		q = buf;
 
 		while (*p && (*p != ';') && (q < buf + 255))
 			*(q++) = *(p++);
-		*q = 0;
+		*q = '\0';
 
 		if ((buf[0] == '/') && (read_file))
 			/* item is a filename, include its contents */
@@ -200,9 +200,9 @@
 
 	p = line;
 	q = buf;
-	while ((*p != 0) && (*p != ':') && (q < buf + 255))
+	while ((*p != '\0') && (*p != ':') && (q < buf + 255))
 		*(q++) = *(p++);
-	*q = 0;
+	*q = '\0';
 
 	iface = g_malloc(sizeof(interface));
 	iface->address = g_strdup(buf);
@@ -229,9 +229,9 @@
 
 	p = line;
 	q = buf;
-	while ((*p != 0) && (*p != '/') && (q < buf + 255))
+	while ((*p != '\0') && (*p != '/') && (q < buf + 255))
 		*(q++) = *(p++);
-	*q = 0;
+	*q = '\0';
 
 	if ((addr.s_addr = inet_addr(buf)) != INADDR_NONE) {
 		if (*p) {
@@ -322,7 +322,7 @@
 		ptr++;
 		c = fgetc(in);
 	}
-	*ptr = 0;
+	*ptr = '\0';
 	ungetc(c, in);
 
 	if (c == EOF) {
@@ -336,7 +336,7 @@
 
 	DEBUG(6) fprintf(stderr, "lval = %s\n", buf);
 
-	return buf[0] != 0;
+	return buf[0] != '\0';
 }
 
 static gboolean
@@ -359,7 +359,7 @@
 			ptr++;
 			c = fgetc(in);
 		}
-		*ptr = 0;
+		*ptr = '\0';
 		ungetc(c, in);
 	} else {
 		gboolean escape = FALSE;
@@ -376,7 +376,7 @@
 			}
 			c = fgetc(in);
 		}
-		*ptr = 0;
+		*ptr = '\0';
 	}
 
 	eat_line_trailing(in);