summaryrefslogtreecommitdiff
path: root/src/utilities/util_dump.c
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/utilities/util_dump.c
parent65ab67ed8d9777285dedf89cc506b9cffc52942e (diff)
downloadmongo-360b43b33170a89587a737988477d0619008ec2a.tar.gz
WT-3216 changes suggested by clang-tidy (#3328)
Diffstat (limited to 'src/utilities/util_dump.c')
-rw-r--r--src/utilities/util_dump.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/utilities/util_dump.c b/src/utilities/util_dump.c
index cded40a8b45..947fa7bf9ef 100644
--- a/src/utilities/util_dump.c
+++ b/src/utilities/util_dump.c
@@ -504,17 +504,18 @@ dump_prefix(WT_SESSION *session, bool hex, bool json)
(void)wiredtiger_version(&vmajor, &vminor, &vpatch);
+ if (json && printf(
+ " \"%s\" : \"%d (%d.%d.%d)\",\n",
+ DUMP_JSON_VERSION_MARKER, DUMP_JSON_CURRENT_VERSION,
+ vmajor, vminor, vpatch) < 0)
+ return (util_err(session, EIO, NULL));
+
if (!json && (printf(
"WiredTiger Dump (WiredTiger Version %d.%d.%d)\n",
vmajor, vminor, vpatch) < 0 ||
printf("Format=%s\n", hex ? "hex" : "print") < 0 ||
printf("Header\n") < 0))
return (util_err(session, EIO, NULL));
- else if (json && printf(
- " \"%s\" : \"%d (%d.%d.%d)\",\n",
- DUMP_JSON_VERSION_MARKER, DUMP_JSON_CURRENT_VERSION,
- vmajor, vminor, vpatch) < 0)
- return (util_err(session, EIO, NULL));
return (0);
}