summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2019-10-24 20:51:30 -0700
committerRuss Allbery <eagle@eyrie.org>2019-10-24 22:01:03 -0700
commit45437ef55ed4f27a89f52a1c518b5eb0eda3d25f (patch)
tree1815db3d1a9c45c2cab950f13dd34bc42f6cf96e /server
parent956950fcc2092cb17cb81216067ed2fea6819d93 (diff)
Fix cppcheck warnings
Lots of cppcheck fixes for new diagnostics in 1.89, plus some additional suppressions for one disagreement and a couple of apparent bugs.
Diffstat (limited to 'server')
-rw-r--r--server/commands.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/commands.c b/server/commands.c
index a4bbe13..caa60bf 100644
--- a/server/commands.c
+++ b/server/commands.c
@@ -6,7 +6,7 @@
*
* Written by Russ Allbery <eagle@eyrie.org>
* Based on work by Anton Ushakov
- * Copyright 2015-2016 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015-2016, 2019 Russ Allbery <eagle@eyrie.org>
* Copyright 2016 Dropbox, Inc.
* Copyright 2002-2010, 2012-2014
* The Board of Trustees of the Leland Stanford Junior University
@@ -437,13 +437,10 @@ server_run_command(struct client *client, struct config *config,
free(subcommand);
subcommand = xstrdup(rule->help);
}
- }
-
- /* Assemble the argv for the command we're about to run. */
- if (help)
req_argv = create_argv_help(rule->program, subcommand, helpsubcommand);
- else
+ } else {
req_argv = create_argv_command(rule, &process, argv);
+ }
/* Now actually execute the program. */
process.command = command;