From 58996b841ac1a19794d704b5622480adc165c434 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 26 Jun 2015 08:05:20 +0200 Subject: config/Global: allow calling config_get_string() with one argument default_value defaults to nullptr. --- src/config/ConfigGlobal.hxx | 2 +- src/config/ConfigPath.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config') diff --git a/src/config/ConfigGlobal.hxx b/src/config/ConfigGlobal.hxx index 9e8687e82..b24b9aada 100644 --- a/src/config/ConfigGlobal.hxx +++ b/src/config/ConfigGlobal.hxx @@ -73,7 +73,7 @@ config_find_block(ConfigBlockOption option, const char *key, const char *value); gcc_pure const char * -config_get_string(enum ConfigOption option, const char *default_value); +config_get_string(enum ConfigOption option, const char *default_value=nullptr); /** * Returns an optional configuration variable which contains an diff --git a/src/config/ConfigPath.cxx b/src/config/ConfigPath.cxx index fe42fdf60..c1e57b3ba 100644 --- a/src/config/ConfigPath.cxx +++ b/src/config/ConfigPath.cxx @@ -70,7 +70,7 @@ GetHome(Error &error) static AllocatedPath GetConfiguredHome(Error &error) { - const char *user = config_get_string(ConfigOption::USER, nullptr); + const char *user = config_get_string(ConfigOption::USER); return user != nullptr ? GetHome(user, error) : GetHome(error); -- cgit v1.2.3