summaryrefslogtreecommitdiff
path: root/src/include/api.h
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-03-16 23:50:25 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2017-03-17 14:50:25 +1100
commit360b43b33170a89587a737988477d0619008ec2a (patch)
treee2941b325dbfc13000f533c500e9743a2027eb3f /src/include/api.h
parent65ab67ed8d9777285dedf89cc506b9cffc52942e (diff)
downloadmongo-360b43b33170a89587a737988477d0619008ec2a.tar.gz
WT-3216 changes suggested by clang-tidy (#3328)
Diffstat (limited to 'src/include/api.h')
-rw-r--r--src/include/api.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/api.h b/src/include/api.h
index 1fa777ed5cc..a3636eb8040 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -19,7 +19,7 @@
__wt_verbose((s), WT_VERB_API, "CALL: " #h ":" #n)
#define API_CALL(s, h, n, dh, config, cfg) do { \
- const char *cfg[] = \
+ const char *(cfg)[] = \
{ WT_CONFIG_BASE(s, h##_##n), config, NULL }; \
API_SESSION_INIT(s, h, n, dh); \
WT_ERR(WT_SESSION_CHECK_PANIC(s)); \
@@ -62,15 +62,16 @@
if (__autotxn) { \
if (F_ISSET(&(s)->txn, WT_TXN_AUTOCOMMIT)) \
F_CLR(&(s)->txn, WT_TXN_AUTOCOMMIT); \
- else if (ret == 0 && !F_ISSET(&(s)->txn, WT_TXN_ERROR)) \
- ret = __wt_txn_commit((s), NULL); \
+ else if ((ret) == 0 && \
+ !F_ISSET(&(s)->txn, WT_TXN_ERROR)) \
+ (ret) = __wt_txn_commit((s), NULL); \
else { \
if (retry) \
WT_TRET(__wt_session_copy_values(s)); \
WT_TRET(__wt_txn_rollback((s), NULL)); \
- if ((ret == 0 || ret == WT_ROLLBACK) && \
+ if (((ret) == 0 || (ret) == WT_ROLLBACK) && \
(retry)) { \
- ret = 0; \
+ (ret) = 0; \
continue; \
} \
WT_TRET(__wt_session_reset_cursors(s, false)); \