summaryrefslogtreecommitdiff
path: root/src/utilities/util_rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities/util_rename.c')
-rw-r--r--src/utilities/util_rename.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/utilities/util_rename.c b/src/utilities/util_rename.c
index aee299c6e63..bb2d40cd103 100644
--- a/src/utilities/util_rename.c
+++ b/src/utilities/util_rename.c
@@ -30,22 +30,15 @@ util_rename(WT_SESSION *session, int argc, char *argv[])
/* The remaining arguments are the object uri and new name. */
if (argc != 2)
return (usage());
- if ((uri = util_name(session, *argv, "table")) == NULL)
+ if ((uri = util_uri(session, *argv, "table")) == NULL)
return (1);
newuri = argv[1];
- if ((ret = session->rename(session, uri, newuri, NULL)) != 0) {
- fprintf(stderr, "%s: rename %s to %s: %s\n",
- progname, uri, newuri, session->strerror(session, ret));
- goto err;
- }
-
- if (0) {
-err: ret = 1;
- }
+ if ((ret = session->rename(session, uri, newuri, NULL)) != 0)
+ (void)util_err(
+ session, ret, "session.rename: %s, %s", uri, newuri);
free(uri);
-
return (ret);
}