comparison src/spool.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 0267fe9745d5
comparison
equal deleted inserted replaced
14:a8f3424347dc 15:f671821d8222
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18 18
19 #include <sys/stat.h>
20
19 #include "masqmail.h" 21 #include "masqmail.h"
20 #include <sys/stat.h>
21 #include "dotlock.h" 22 #include "dotlock.h"
22 23
23 static gint 24 static gint
24 read_line(FILE * in, gchar * buf, gint buf_len) 25 read_line(FILE * in, gchar * buf, gint buf_len)
25 { 26 {
37 return -1; 38 return -1;
38 } 39 }
39 if ((p > 0) && (buf[p - 1] == '\r')) 40 if ((p > 0) && (buf[p - 1] == '\r'))
40 p--; 41 p--;
41 buf[p++] = '\n'; 42 buf[p++] = '\n';
42 buf[p] = 0; 43 buf[p] = '\0';
43 44
44 return p; 45 return p;
45 } 46 }
46 47
47 static void 48 static void
66 static address* 67 static address*
67 spool_scan_rcpt(gchar * line) 68 spool_scan_rcpt(gchar * line)
68 { 69 {
69 address *rcpt = NULL; 70 address *rcpt = NULL;
70 71
71 if (line[3] != 0) { 72 if (line[3] != '\0') {
72 if (line[4] != '|') { 73 if (line[4] != '|') {
73 rcpt = create_address(&(line[4]), TRUE); 74 rcpt = create_address(&(line[4]), TRUE);
74 } else { 75 } else {
75 rcpt = create_address_pipe(&(line[4])); 76 rcpt = create_address_pipe(&(line[4]));
76 } 77 }