# HG changeset patch # User markus schnalke # Date 1330521796 -3600 # Node ID 309935f59820b3956db27b2255d4a25c68b74bb4 # Parent 7c5e51c53f72a60f4c8a433c8e1d832c87757158 Minor refactoring and added a newline to the debug output. diff -r 7c5e51c53f72 -r 309935f59820 src/spool.c --- a/src/spool.c Wed Feb 29 14:22:44 2012 +0100 +++ b/src/spool.c Wed Feb 29 14:23:16 2012 +0100 @@ -73,17 +73,18 @@ { address *rcpt = NULL; - if (line[3] != '\0') { - if (line[4] != '|') { - rcpt = create_address(&(line[4]), TRUE); - } else { - rcpt = create_address_pipe(&(line[4])); - } - if (line[3] == 'X') { - addr_mark_delivered(rcpt); - } else if (line[3] == 'F') { - addr_mark_failed(rcpt); - } + if (!line[3]) { + return NULL; + } + if (line[4] == '|') { + rcpt = create_address_pipe(line+4); + } else { + rcpt = create_address(line+4, TRUE); + } + if (line[3] == 'X') { + addr_mark_delivered(rcpt); + } else if (line[3] == 'F') { + addr_mark_failed(rcpt); } return rcpt; } @@ -147,7 +148,8 @@ break; } else if (strncasecmp(buf, "MF:", 3) == 0) { msg->return_path = create_address(&(buf[3]), TRUE); - DEBUG(3) debugf("spool_read: MAIL FROM: %s", msg->return_path->address); + DEBUG(3) debugf("spool_read: MAIL FROM: %s\n", + msg->return_path->address); } else if (strncasecmp(buf, "RT:", 3) == 0) { address *addr; addr = spool_scan_rcpt(buf);