diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-02-02 19:20:33 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-02-02 19:20:33 -0500 |
commit | a26d87a53eb2ac2dcae9312b7979499c34c11613 (patch) | |
tree | 38b6553705ee8396d7ac52eef9ebbb5026850e04 /examples | |
parent | 8545c4b3b7f5ed306215c82f1ad1cbe3664f0c50 (diff) | |
download | mongo-a26d87a53eb2ac2dcae9312b7979499c34c11613.tar.gz |
Replace wiredtiger_strerror_r with WT_SESSION.strerror, reference #1516.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ex_all.c | 8 | ||||
-rw-r--r-- | examples/c/ex_data_source.c | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c index 51b4bb42040..51c63e307c6 100644 --- a/examples/c/ex_all.c +++ b/examples/c/ex_all.c @@ -357,12 +357,8 @@ cursor_ops(WT_SESSION *session) const char *key = "non-existent key"; cursor->set_key(cursor, key); if ((ret = cursor->remove(cursor)) != 0) { - char buf[128]; - - if (wiredtiger_strerror_r(ret, buf, sizeof(buf)) != 0) - (void)snprintf( - buf, sizeof(buf), "error value: %d\n", ret); - fprintf(stderr, "cursor.remove: %s\n", buf); + fprintf(stderr, + "cursor.remove: %s\n", session->strerror(session, ret)); return (ret); } /*! [Display an error thread safe] */ diff --git a/examples/c/ex_data_source.c b/examples/c/ex_data_source.c index 5043fa1b67d..7fb400b5922 100644 --- a/examples/c/ex_data_source.c +++ b/examples/c/ex_data_source.c @@ -75,8 +75,9 @@ my_create(WT_DATA_SOURCE *dsrc, WT_SESSION *session, { int ret = 0; /*! [WT_EXTENSION_API strerror] */ - (void)wt_api->err_printf(wt_api, - session, "WiredTiger error return: %s", wt_api->strerror(ret)); + (void)wt_api->err_printf(wt_api, session, + "WiredTiger error return: %s", + wt_api->strerror(wt_api, session, ret)); /*! [WT_EXTENSION_API strerror] */ } |