summaryrefslogtreecommitdiff
path: root/test/salvage
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-02-21 07:08:11 -0500
committerGitHub <noreply@github.com>2017-02-21 07:08:11 -0500
commit1aaf7b2d54886e4d323f05dfa6e08d86d614ee1c (patch)
tree2f6401468e917b9d2b47dcbf032966bf0c5a107d /test/salvage
parente7b2a53c33271598c9041eec8363c95ff37daa58 (diff)
downloadmongo-1aaf7b2d54886e4d323f05dfa6e08d86d614ee1c.tar.gz
WT-3191 lint (#3310)
* WT-3191 lint Remove WT_UNUSED(session), session is used in the function. * Check returns from WT_CURSOR.get_value(). * Lots of the csuite test programs have "normal" output now, change the testutil_die() function to include a "FAILED" message so it's possible to figure it out. Make the program name a global so we can print it out on error, add a standard testutil_set_progname function to set the program name and call it from everywhere. * Lint is deeply saddened by mixing-and-matching enums and ints, use a switch statement instead of arithmetic operations. * Avoid enum arithmetic with minimal casting. This change only uses the enum for one switch.
Diffstat (limited to 'test/salvage')
-rw-r--r--test/salvage/salvage.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/salvage/salvage.c b/test/salvage/salvage.c
index b8553bbd72d..942f7faba03 100644
--- a/test/salvage/salvage.c
+++ b/test/salvage/salvage.c
@@ -54,8 +54,6 @@ void run(int);
void t(int, u_int, int);
int usage(void);
-static const char *progname; /* Program name */
-
static FILE *res_fp; /* Results file */
static u_int page_type; /* File types */
static int value_unique; /* Values are unique */
@@ -70,10 +68,7 @@ main(int argc, char *argv[])
u_int ptype;
int ch, r;
- if ((progname = strrchr(argv[0], DIR_DELIM)) == NULL)
- progname = argv[0];
- else
- ++progname;
+ (void)testutil_set_progname(argv);
r = 0;
ptype = 0;