{Other,Database}Commands: contract declaration and assignment
This commit is contained in:
parent
e9a85aa4e4
commit
4c27898ce7
@ -34,13 +34,10 @@
|
|||||||
CommandResult
|
CommandResult
|
||||||
handle_lsinfo2(Client &client, int argc, char *argv[])
|
handle_lsinfo2(Client &client, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
const char *uri;
|
const char *const uri = argc == 2
|
||||||
|
? argv[1]
|
||||||
if (argc == 2)
|
|
||||||
uri = argv[1];
|
|
||||||
else
|
|
||||||
/* default is root directory */
|
/* default is root directory */
|
||||||
uri = "";
|
: "";
|
||||||
|
|
||||||
const DatabaseSelection selection(uri, false);
|
const DatabaseSelection selection(uri, false);
|
||||||
|
|
||||||
|
@ -121,13 +121,10 @@ static constexpr tag_handler print_tag_handler = {
|
|||||||
CommandResult
|
CommandResult
|
||||||
handle_lsinfo(Client &client, int argc, char *argv[])
|
handle_lsinfo(Client &client, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
const char *uri;
|
const char *const uri = argc == 2
|
||||||
|
? argv[1]
|
||||||
if (argc == 2)
|
|
||||||
uri = argv[1];
|
|
||||||
else
|
|
||||||
/* default is root directory */
|
/* default is root directory */
|
||||||
uri = "";
|
: "";
|
||||||
|
|
||||||
if (memcmp(uri, "file:///", 8) == 0) {
|
if (memcmp(uri, "file:///", 8) == 0) {
|
||||||
/* print information about an arbitrary local file */
|
/* print information about an arbitrary local file */
|
||||||
|
Loading…
Reference in New Issue
Block a user