masqmail
diff src/header.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 | 3708b655a371 |
line diff
1.1 --- a/src/header.c Wed Oct 29 21:21:26 2008 +0100 1.2 +++ b/src/header.c Thu Nov 06 09:18:38 2008 +0100 1.3 @@ -18,30 +18,18 @@ 1.4 #include "masqmail.h" 1.5 1.6 header_name header_names[] = { 1.7 - {"From", HEAD_FROM,} 1.8 - , 1.9 - {"Sender", HEAD_SENDER,} 1.10 - , 1.11 - {"To", HEAD_TO,} 1.12 - , 1.13 - {"Cc", HEAD_CC,} 1.14 - , 1.15 - {"Bcc", HEAD_BCC,} 1.16 - , 1.17 - {"Date", HEAD_DATE,} 1.18 - , 1.19 - {"Message-Id", HEAD_MESSAGE_ID,} 1.20 - , 1.21 - {"Reply-To", HEAD_REPLY_TO,} 1.22 - , 1.23 - {"Subject", HEAD_SUBJECT,} 1.24 - , 1.25 - {"Return-Path", HEAD_RETURN_PATH,} 1.26 - , 1.27 - {"Envelope-To", HEAD_ENVELOPE_TO,} 1.28 - , 1.29 - {"Received", HEAD_RECEIVED} 1.30 - , 1.31 + {"From", HEAD_FROM,}, 1.32 + {"Sender", HEAD_SENDER,}, 1.33 + {"To", HEAD_TO,}, 1.34 + {"Cc", HEAD_CC,}, 1.35 + {"Bcc", HEAD_BCC,}, 1.36 + {"Date", HEAD_DATE,}, 1.37 + {"Message-Id", HEAD_MESSAGE_ID,}, 1.38 + {"Reply-To", HEAD_REPLY_TO,}, 1.39 + {"Subject", HEAD_SUBJECT,}, 1.40 + {"Return-Path", HEAD_RETURN_PATH,}, 1.41 + {"Envelope-To", HEAD_ENVELOPE_TO,}, 1.42 + {"Received", HEAD_RECEIVED}, 1.43 }; 1.44 1.45 /* this was borrowed from exim and slightly changed */ 1.46 @@ -100,7 +88,7 @@ 1.47 1.48 while (*p != ':' && q < buf + 63 && *p) 1.49 *(q++) = *(p++); 1.50 - *q = 0; 1.51 + *q = '\0'; 1.52 1.53 if (strcasecmp(buf, hdr_str) == 0) 1.54 found_list = g_list_append(found_list, hdr); 1.55 @@ -149,7 +137,7 @@ 1.56 q = tmp_hdr; 1.57 1.58 if (p[len - 1] == '\n') 1.59 - p[len - 1] = 0; 1.60 + p[len - 1] = '\0'; 1.61 1.62 while (*p) { 1.63 gint i, l; 1.64 @@ -184,7 +172,7 @@ 1.65 i++; 1.66 } 1.67 *(q++) = '\n'; 1.68 - *(q++) = *(p++); /* this is either space, tab or 0 */ 1.69 + *(q++) = *(p++); /* this is either space, tab or 0 */ 1.70 } 1.71 { 1.72 gchar *new_hdr; 1.73 @@ -257,7 +245,7 @@ 1.74 1.75 while (*p && (*p != ':') && (q < buf + 63)) 1.76 *(q++) = *(p++); 1.77 - *q = 0; 1.78 + *q = '\0'; 1.79 1.80 if (*p != ':') 1.81 return NULL;