diff options
author | Denys Vlasenko | 2020-12-17 12:34:25 +0100 |
---|---|---|
committer | Denys Vlasenko | 2020-12-17 12:34:25 +0100 |
commit | b6237c0657074e8a61b2123601df36389659b603 (patch) | |
tree | 29b0dedd34e238c187fb3c270bf2e4fc2f6522c1 /mailutils/mail.c | |
parent | 25b2680056454dc4761ba3b2efde7c3414738f8c (diff) | |
download | busybox-b6237c0657074e8a61b2123601df36389659b603.zip busybox-b6237c0657074e8a61b2123601df36389659b603.tar.gz |
mail: commonalize send_r_n()
function old new delta
send_mail_command 85 55 -30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'mailutils/mail.c')
-rw-r--r-- | mailutils/mail.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mailutils/mail.c b/mailutils/mail.c index ce52679..9735d48 100644 --- a/mailutils/mail.c +++ b/mailutils/mail.c @@ -69,6 +69,13 @@ void FAST_FUNC launch_helper(const char **argv) // parent goes on } +void FAST_FUNC send_r_n(const char *s) +{ + if (G.verbose) + bb_error_msg("send:'%s'", s); + printf("%s\r\n", s); +} + char* FAST_FUNC send_mail_command(const char *fmt, const char *param) { char *msg; @@ -77,9 +84,7 @@ char* FAST_FUNC send_mail_command(const char *fmt, const char *param) msg = (char*)fmt; if (fmt) { msg = xasprintf(fmt, param); - if (G.verbose) - bb_error_msg("send:'%s'", msg); - printf("%s\r\n", msg); + send_r_n(msg); } fflush_all(); return msg; |