diff --git a/src/protocol/ftp/ftp.c b/src/protocol/ftp/ftp.c index 2f6b2cbec..38a1aa5ca 100644 --- a/src/protocol/ftp/ftp.c +++ b/src/protocol/ftp/ftp.c @@ -1267,15 +1267,8 @@ out_of_mem: return; } -#define ADD_CONST(str) { \ - add_fragment(conn->cached, conn->from, str, sizeof(str) - 1); \ - conn->from += (sizeof(str) - 1); } - -#define ADD_STRING() { \ - add_fragment(conn->cached, conn->from, string.source, string.length); \ - conn->from += string.length; } - - ADD_STRING(); + add_fragment(conn->cached, conn->from, string.source, string.length); + conn->from += string.length; done_string(&string); @@ -1335,6 +1328,10 @@ out_of_mem: (unsigned char *) dircolor) == -1) goto out_of_mem; +#define ADD_CONST(str) { \ + add_fragment(conn->cached, conn->from, str, sizeof(str) - 1); \ + conn->from += (sizeof(str) - 1); } + if (ftp->dir) ADD_CONST("\n
\n\n"); close_socket(conn->data_socket);