masqmail-0.2
changeset 14:a8f3424347dc
replaced number 0 with character \0 where appropriate
author | meillo@marmaro.de |
---|---|
date | Wed, 29 Oct 2008 21:21:26 +0100 |
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 diff
1.1 --- a/src/accept.c Wed Oct 29 21:10:18 2008 +0100 1.2 +++ b/src/accept.c Wed Oct 29 21:21:26 2008 +0100 1.3 @@ -34,7 +34,7 @@ 1.4 { 1.5 static gchar base62_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 1.6 gchar *p = res + len; 1.7 - *p = 0; 1.8 + *p = '\0'; 1.9 while (p > res) { 1.10 *(--p) = base62_chars[value % 62]; 1.11 value /= 62; 1.12 @@ -73,7 +73,7 @@ 1.13 gint line_cnt = 0, data_size = 0; 1.14 1.15 line = g_malloc(line_size); 1.16 - line[0] = 0; 1.17 + line[0] = '\0'; 1.18 1.19 while (TRUE) { 1.20 int len = read_sockline1(in, &line, &line_size, 5 * 60, READSOCKL_CVT_CRLF); 1.21 @@ -95,7 +95,7 @@ 1.22 if (len1 > 0) { /* == 0 is 'normal' (EOF after a CR) */ 1.23 if (line1[len1 - 1] != '\n') { /* some mail clients allow unterminated lines */ 1.24 line1[len1] = '\n'; 1.25 - line1[len1 + 1] = 0; 1.26 + line1[len1 + 1] = '\0'; 1.27 msg->data_list = g_list_prepend(msg->data_list, g_strdup(line1)); 1.28 data_size += strlen(line1); 1.29 line_cnt++;
2.1 --- a/src/address.c Wed Oct 29 21:10:18 2008 +0100 2.2 +++ b/src/address.c Wed Oct 29 21:21:26 2008 +0100 2.3 @@ -177,7 +177,7 @@ 2.4 if (buffer) 2.5 g_free(buffer); 2.6 2.7 - if (addr->local_part[0] == 0) { 2.8 + if (addr->local_part[0] == '\0') { 2.9 buffer = g_strdup("<>"); 2.10 } else { 2.11 buffer = g_strdup_printf("<%s@%s>", addr->local_part ? addr->local_part : "", addr->domain ? addr->domain : "");
3.1 --- a/src/alias.c Wed Oct 29 21:10:18 2008 +0100 3.2 +++ b/src/alias.c Wed Oct 29 21:21:26 2008 +0100 3.3 @@ -67,14 +67,14 @@ 3.4 gchar *p, *q; 3.5 3.6 p = line; 3.7 - while (*p != 0) { 3.8 + while (*p != '\0') { 3.9 q = buf; 3.10 while (isspace(*p)) 3.11 p++; 3.12 if (*p != '\"') { 3.13 while (*p && (*p != ',') && (q < buf + 255)) 3.14 *(q++) = *(p++); 3.15 - *q = 0; 3.16 + *q = '\0'; 3.17 } else { 3.18 gboolean escape = FALSE; 3.19 p++; 3.20 @@ -87,7 +87,7 @@ 3.21 } 3.22 p++; 3.23 } 3.24 - *q = 0; 3.25 + *q = '\0'; 3.26 while (*p && (*p != ',')) 3.27 p++; 3.28 }
4.1 --- a/src/conf.c Wed Oct 29 21:10:18 2008 +0100 4.2 +++ b/src/conf.c Wed Oct 29 21:21:26 2008 +0100 4.3 @@ -118,12 +118,12 @@ 4.4 DEBUG(6) fprintf(stderr, "parsing list %s\n", line); 4.5 4.6 p = line; 4.7 - while (*p != 0) { 4.8 + while (*p != '\0') { 4.9 q = buf; 4.10 4.11 while (*p && (*p != ';') && (q < buf + 255)) 4.12 *(q++) = *(p++); 4.13 - *q = 0; 4.14 + *q = '\0'; 4.15 4.16 if ((buf[0] == '/') && (read_file)) 4.17 /* item is a filename, include its contents */ 4.18 @@ -200,9 +200,9 @@ 4.19 4.20 p = line; 4.21 q = buf; 4.22 - while ((*p != 0) && (*p != ':') && (q < buf + 255)) 4.23 + while ((*p != '\0') && (*p != ':') && (q < buf + 255)) 4.24 *(q++) = *(p++); 4.25 - *q = 0; 4.26 + *q = '\0'; 4.27 4.28 iface = g_malloc(sizeof(interface)); 4.29 iface->address = g_strdup(buf); 4.30 @@ -229,9 +229,9 @@ 4.31 4.32 p = line; 4.33 q = buf; 4.34 - while ((*p != 0) && (*p != '/') && (q < buf + 255)) 4.35 + while ((*p != '\0') && (*p != '/') && (q < buf + 255)) 4.36 *(q++) = *(p++); 4.37 - *q = 0; 4.38 + *q = '\0'; 4.39 4.40 if ((addr.s_addr = inet_addr(buf)) != INADDR_NONE) { 4.41 if (*p) { 4.42 @@ -322,7 +322,7 @@ 4.43 ptr++; 4.44 c = fgetc(in); 4.45 } 4.46 - *ptr = 0; 4.47 + *ptr = '\0'; 4.48 ungetc(c, in); 4.49 4.50 if (c == EOF) { 4.51 @@ -336,7 +336,7 @@ 4.52 4.53 DEBUG(6) fprintf(stderr, "lval = %s\n", buf); 4.54 4.55 - return buf[0] != 0; 4.56 + return buf[0] != '\0'; 4.57 } 4.58 4.59 static gboolean 4.60 @@ -359,7 +359,7 @@ 4.61 ptr++; 4.62 c = fgetc(in); 4.63 } 4.64 - *ptr = 0; 4.65 + *ptr = '\0'; 4.66 ungetc(c, in); 4.67 } else { 4.68 gboolean escape = FALSE; 4.69 @@ -376,7 +376,7 @@ 4.70 } 4.71 c = fgetc(in); 4.72 } 4.73 - *ptr = 0; 4.74 + *ptr = '\0'; 4.75 } 4.76 4.77 eat_line_trailing(in);