Remove useless argument of logging macros

Previously, logging macros (info! warn! error!) accepted integer
argument (data1), that was passed to callback function verbatim. In all
call sites this argument was 0.

With this change, that data1 argument is no longer part of macro
interface, 0 is always passed to callback in internals of these macros.
This commit is contained in:
Dmitry Bogatov
2019-09-10 19:04:21 +00:00
parent 2dd3f169db
commit 57daa0f7f0
26 changed files with 257 additions and 379 deletions

View File

@@ -460,7 +460,7 @@ unsafe fn dc_mimeparser_parse_mime_recursive(
{
info!(
mimeparser.context,
0, "Protected headers found in text/rfc822-headers attachment: Will be ignored.",
"Protected headers found in text/rfc822-headers attachment: Will be ignored.",
);
return 0i32;
}
@@ -474,7 +474,7 @@ unsafe fn dc_mimeparser_parse_mime_recursive(
) != MAILIMF_NO_ERROR as libc::c_int
|| mimeparser.header_protected.is_null()
{
warn!(mimeparser.context, 0, "Protected headers parsing error.",);
warn!(mimeparser.context, "Protected headers parsing error.",);
} else {
hash_header(
&mut mimeparser.header,
@@ -485,7 +485,6 @@ unsafe fn dc_mimeparser_parse_mime_recursive(
} else {
info!(
mimeparser.context,
0,
"Protected headers found in MIME header: Will be ignored as we already found an outer one."
);
}
@@ -667,7 +666,6 @@ unsafe fn dc_mimeparser_parse_mime_recursive(
if plain_cnt == 1i32 && html_cnt == 1i32 {
warn!(
mimeparser.context,
0i32,
"HACK: multipart/mixed message found with PLAIN and HTML, we\'ll skip the HTML part as this seems to be unwanted."
);
skip_part = html_part
@@ -1072,7 +1070,7 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
);
let (res, _, _) = encoding.decode(data);
info!(mimeparser.context, 0, "decoded message: '{}'", res);
info!(mimeparser.context, "decoded message: '{}'", res);
if res.is_empty() {
/* no error - but nothing to add */
ok_to_continue = false;
@@ -1085,7 +1083,6 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
} else {
warn!(
mimeparser.context,
0,
"Cannot convert {} bytes from \"{}\" to \"utf-8\".",
decoded_data_bytes as libc::c_int,
as_str(charset),