summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/support/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/support/err.c')
-rw-r--r--src/third_party/wiredtiger/src/support/err.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/third_party/wiredtiger/src/support/err.c b/src/third_party/wiredtiger/src/support/err.c
index fc6569cb81e..e9b7a53a2ab 100644
--- a/src/third_party/wiredtiger/src/support/err.c
+++ b/src/third_party/wiredtiger/src/support/err.c
@@ -16,15 +16,12 @@ static int
__handle_error_default(WT_EVENT_HANDLER *handler,
WT_SESSION *wt_session, int error, const char *errmsg)
{
- WT_SESSION_IMPL *session;
-
WT_UNUSED(handler);
+ WT_UNUSED(wt_session);
WT_UNUSED(error);
- session = (WT_SESSION_IMPL *)wt_session;
-
- WT_RET(__wt_fprintf(session, stderr, "%s\n", errmsg));
- WT_RET(__wt_fflush(session, stderr));
+ WT_RET(__wt_fprintf(stderr, "%s\n", errmsg));
+ WT_RET(__wt_fflush(stderr));
return (0);
}
@@ -36,14 +33,11 @@ static int
__handle_message_default(WT_EVENT_HANDLER *handler,
WT_SESSION *wt_session, const char *message)
{
- WT_SESSION_IMPL *session;
-
WT_UNUSED(handler);
+ WT_UNUSED(wt_session);
- session = (WT_SESSION_IMPL *)wt_session;
-
- WT_RET(__wt_fprintf(session, stdout, "%s\n", message));
- WT_RET(__wt_fflush(session, stdout));
+ WT_RET(__wt_fprintf(stdout, "%s\n", message));
+ WT_RET(__wt_fflush(stdout));
return (0);
}
@@ -181,23 +175,23 @@ __wt_eventv(WT_SESSION_IMPL *session, int msg_event, int error,
* example, we can end up here without a session.)
*/
if (session == NULL) {
- WT_RET(__wt_fprintf(session, stderr,
+ WT_RET(__wt_fprintf(stderr,
"WiredTiger Error%s%s: ",
error == 0 ? "" : ": ",
error == 0 ? "" : __wt_strerror(session, error, NULL, 0)));
- WT_RET(__wt_vfprintf(session, stderr, fmt, ap));
- WT_RET(__wt_fprintf(session, stderr, "\n"));
- return (__wt_fflush(session, stderr));
+ WT_RET(__wt_vfprintf(stderr, fmt, ap));
+ WT_RET(__wt_fprintf(stderr, "\n"));
+ return (__wt_fflush(stderr));
}
p = s;
end = s + sizeof(s);
/*
- * We have several prefixes for the error message:
- * a timestamp and the process and thread ids, the database error
- * prefix, the data-source's name, and the session's name. Write them
- * as a comma-separate list, followed by a colon.
+ * We have several prefixes for the error message: a timestamp and the
+ * process and thread ids, the database error prefix, the data-source's
+ * name, and the session's name. Write them as a comma-separate list,
+ * followed by a colon.
*/
prefix_cnt = 0;
if (__wt_epoch(session, &ts) == 0) {