From 4c27898ce7f72c75405c293e3b8e06db4d2438eb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 28 Feb 2014 07:11:45 +0100 Subject: {Other,Database}Commands: contract declaration and assignment --- src/command/OtherCommands.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/command/OtherCommands.cxx') diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx index b3564040c..6415e84df 100644 --- a/src/command/OtherCommands.cxx +++ b/src/command/OtherCommands.cxx @@ -121,13 +121,10 @@ static constexpr tag_handler print_tag_handler = { CommandResult handle_lsinfo(Client &client, int argc, char *argv[]) { - const char *uri; - - if (argc == 2) - uri = argv[1]; - else + const char *const uri = argc == 2 + ? argv[1] /* default is root directory */ - uri = ""; + : ""; if (memcmp(uri, "file:///", 8) == 0) { /* print information about an arbitrary local file */ -- cgit v1.2.3