# HG changeset patch # User meillo@marmaro.de # Date 1225311686 -3600 # Node ID a8f3424347dc94da3e098f779fbd08d2310fc771 # Parent 49dab67fe4619b79a4183ec32e529d2fd9ad14ef replaced number 0 with character \0 where appropriate diff -r 49dab67fe461 -r a8f3424347dc src/accept.c --- 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++; diff -r 49dab67fe461 -r a8f3424347dc src/address.c --- 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 : ""); diff -r 49dab67fe461 -r a8f3424347dc src/alias.c --- 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++; } diff -r 49dab67fe461 -r a8f3424347dc src/conf.c --- 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);