sendfile: code shrink
function old new delta printstr_base64 - 22 +22 printbuf_base64 - 11 +11 printfile_base64 - 9 +9 makemime_main 305 294 -11 encode_n_base64 236 223 -13 sendmail_main 1380 1366 -14 encode_base64 36 - -36 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 42/-74) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -371,13 +371,13 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
|
||||
// substitute placeholders
|
||||
plain_auth[0] = '\0';
|
||||
plain_auth[1 + user_len] = '\0';
|
||||
encode_n_base64(NULL, plain_auth, 1 + user_len + 1 + pass_len, NULL);
|
||||
printbuf_base64(plain_auth, 1 + user_len + 1 + pass_len);
|
||||
free(plain_auth);
|
||||
} else if ((opts & OPT_am_mask) == OPT_am_login) {
|
||||
smtp_check("AUTH LOGIN", 334);
|
||||
encode_base64(NULL, G.user, NULL);
|
||||
printstr_base64(G.user);
|
||||
smtp_check("", 334);
|
||||
encode_base64(NULL, G.pass, NULL);
|
||||
printstr_base64(G.pass);
|
||||
}
|
||||
smtp_check("", 235);
|
||||
}
|
||||
|
Reference in New Issue
Block a user