diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-11-27 13:38:07 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-11-27 13:38:07 +0200 |
commit | cc9b15377689b27756597c32f32cd8ac89b84e72 (patch) | |
tree | 835a64dbc727af64fa89f7012e16d3b786daa1dc | |
parent | df29254df82d4aa466f066dd76e00446e540e1cb (diff) | |
download | mailutils-cc9b15377689b27756597c32f32cd8ac89b84e72.tar.gz mailutils-cc9b15377689b27756597c32f32cd8ac89b84e72.tar.bz2 |
Don't use __FILE__ and __LINE__ in mu_debug.
This is spurious as it can be enabled by the debug.line-info
configuration directive.
-rw-r--r-- | libmailutils/datetime/scantime.c | 39 | ||||
-rw-r--r-- | libproto/imap/resplist.c | 3 | ||||
-rw-r--r-- | libproto/imap/resproc.c | 3 |
3 files changed, 16 insertions, 29 deletions
diff --git a/libmailutils/datetime/scantime.c b/libmailutils/datetime/scantime.c index 0f3ba5d11..e1f3475d2 100644 --- a/libmailutils/datetime/scantime.c +++ b/libmailutils/datetime/scantime.c @@ -246,8 +246,7 @@ scan_recovery (const char *fmt, mu_list_t *plist, int skip_alt, if (!c) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %% at the end of input", - __FILE__, __LINE__)); + ("error in format: %% at the end of input")); rc = MU_ERR_FORMAT; break; } @@ -265,8 +264,7 @@ scan_recovery (const char *fmt, mu_list_t *plist, int skip_alt, if (nesting_level == 0) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %%%c out of context", - __FILE__, __LINE__, c)); + ("error in format: %%%c out of context", c)); rc = MU_ERR_FORMAT; break; } @@ -275,8 +273,7 @@ scan_recovery (const char *fmt, mu_list_t *plist, int skip_alt, if (rc || st != bracket_to_state (c)) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %%%c out of context", - __FILE__, __LINE__, c)); + ("error in format: %%%c out of context", c)); rc = MU_ERR_FORMAT; break; } @@ -313,8 +310,7 @@ scan_recovery (const char *fmt, mu_list_t *plist, int skip_alt, { peek_state (*plist, &st, NULL); mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: missing closing %%%c", - __FILE__, __LINE__, + ("error in format: missing closing %%%c", state_to_closing_bracket (st))); return MU_ERR_FORMAT; } @@ -333,8 +329,7 @@ scan_recovery (const char *fmt, mu_list_t *plist, int skip_alt, peek_state (*plist, &st, NULL); mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: missing closing %%%c", - __FILE__, __LINE__, + ("error in format: missing closing %%%c", state_to_closing_bracket (st))); return MU_ERR_FORMAT; } @@ -388,8 +383,7 @@ mu_scan_datetime (const char *input, const char *fmt, if (!c) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %% at the end of input", - __FILE__, __LINE__)); + ("error in format: %% at the end of input")); rc = MU_ERR_FORMAT; break; } @@ -631,15 +625,14 @@ mu_scan_datetime (const char *input, const char *fmt, if (pop_input (save_input_list, &st, NULL)) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: unbalanced %%%c near %s", - __FILE__, __LINE__, c, fmt)); + ("error in format: unbalanced %%%c near %s", + c, fmt)); rc = MU_ERR_FORMAT; } else if (st != bracket_to_state (c)) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %%%c out of context", - __FILE__, __LINE__, c)); + ("error in format: %%%c out of context", c)); rc = MU_ERR_FORMAT; } break; @@ -659,8 +652,7 @@ mu_scan_datetime (const char *input, const char *fmt, if (!c) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: %% at the end of input", - __FILE__, __LINE__)); + ("error in format: %% at the end of input")); rc = MU_ERR_FORMAT; } else if (c == *input) @@ -675,9 +667,8 @@ mu_scan_datetime (const char *input, const char *fmt, default: mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: unrecognized conversion type" - " near %s", - __FILE__, __LINE__, fmt)); + ("error in format: unrecognized conversion type" + " near %s", fmt)); rc = MU_ERR_FORMAT; break; } @@ -700,14 +691,12 @@ mu_scan_datetime (const char *input, const char *fmt, if (rc == MU_ERR_FORMAT) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format string near %s", - __FILE__, __LINE__, fmt)); + ("error in format string near %s", fmt)); } else if (!mu_list_is_empty (save_input_list)) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: error in format: closing bracket missing", - __FILE__, __LINE__)); + ("error in format: closing bracket missing")); rc = MU_ERR_FORMAT; } mu_list_destroy (&save_input_list); diff --git a/libproto/imap/resplist.c b/libproto/imap/resplist.c index 30ad2c964..d82c5b2aa 100644 --- a/libproto/imap/resplist.c +++ b/libproto/imap/resplist.c @@ -281,8 +281,7 @@ _mu_imap_list_at (mu_list_t list, int idx) if (rc) { mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR, - ("%s:%d: cannot get list element: %s", - __FILE__, __LINE__, mu_strerror (rc))); + ("cannot get list element: %s", mu_strerror (rc))); return NULL; } return arg; diff --git a/libproto/imap/resproc.c b/libproto/imap/resproc.c index 89826a955..5740da524 100644 --- a/libproto/imap/resproc.c +++ b/libproto/imap/resproc.c @@ -245,8 +245,7 @@ _std_unsolicited_response (mu_imap_t imap, size_t count, mu_list_t resp) { if (!rp->action) mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_TRACE9, - ("%s:%d: ignoring %s response", - __FILE__, __LINE__, rp->name)); + ("ignoring %s response", rp->name)); else rp->action (imap, resp, NULL); return 0; |