summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsueloverso <sue@mongodb.com>2015-10-05 10:57:58 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2015-10-06 15:10:38 +1100
commit457da5c312e6608e154d9c9485caf3342972e729 (patch)
tree9e6dfac819e0979cc389ccdc8b4bc1d74c2bd07f
parent5c32a0bee76ec0fd09722b80b40825a272cb46e9 (diff)
downloadmongo-457da5c312e6608e154d9c9485caf3342972e729.tar.gz
WT-2159: don't check the config twice on success.
Merge pull request #2242 from wiredtiger/wt-2159 (cherry picked from commit ce9d26513f6c80f6b3266a7568ee1f0c4edcd28d)
-rw-r--r--src/config/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config/config.c b/src/config/config.c
index 92f917915e1..300b1923b9e 100644
--- a/src/config/config.c
+++ b/src/config/config.c
@@ -735,11 +735,16 @@ __wt_config_gets_def(WT_SESSION_IMPL *session,
*value = false_value;
value->val = def;
+
if (cfg == NULL || cfg[0] == NULL || cfg[1] == NULL)
return (0);
- else if (cfg[2] == NULL)
+
+ if (cfg[2] == NULL) {
WT_RET_NOTFOUND_OK(
__wt_config_getones(session, cfg[1], key, value));
+ return (0);
+ }
+
return (__wt_config_gets(session, cfg, key, value));
}