summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/utilities/util_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/utilities/util_load.c')
-rw-r--r--src/third_party/wiredtiger/src/utilities/util_load.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/src/utilities/util_load.c b/src/third_party/wiredtiger/src/utilities/util_load.c
index ca77643eb49..d2f00402217 100644
--- a/src/third_party/wiredtiger/src/utilities/util_load.c
+++ b/src/third_party/wiredtiger/src/utilities/util_load.c
@@ -80,8 +80,8 @@ util_load(WT_SESSION *session, int argc, char *argv[])
if (no_overwrite)
flags |= LOAD_JSON_NO_OVERWRITE;
return (util_load_json(session, filename, flags));
- } else
- return (load_dump(session));
+ }
+ return (load_dump(session));
}
/*
@@ -120,10 +120,12 @@ load_dump(WT_SESSION *session)
goto err;
/* Open the insert cursor. */
- (void)snprintf(config, sizeof(config),
+ if ((ret = __wt_snprintf(config, sizeof(config),
"dump=%s%s%s",
hex ? "hex" : "print",
- append ? ",append" : "", no_overwrite ? ",overwrite=false" : "");
+ append ? ",append" : "",
+ no_overwrite ? ",overwrite=false" : "")) != 0)
+ return (util_err(session, ret, NULL));
if ((ret = session->open_cursor(
session, uri, NULL, config, &cursor)) != 0) {
ret = util_err(session, ret, "%s: session.open_cursor", uri);
@@ -472,6 +474,7 @@ config_update(WT_SESSION *session, char **list)
static int
config_rename(WT_SESSION *session, char **urip, const char *name)
{
+ WT_DECL_RET;
size_t len;
char *buf, *p;
@@ -490,7 +493,9 @@ config_rename(WT_SESSION *session, char **urip, const char *name)
}
*p = '\0';
p = strchr(p + 1, ':');
- snprintf(buf, len, "%s:%s%s", *urip, name, p == NULL ? "" : p);
+ if ((ret = __wt_snprintf(
+ buf, len, "%s:%s%s", *urip, name, p == NULL ? "" : p)) != 0)
+ return (util_err(session, ret, NULL));
*urip = buf;
return (0);