From 7de96275dd6e3b6997e799413e4537561041e199 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 22:32:39 +0200 Subject: ConfigData: use std::string for config_param::value --- src/Permission.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Permission.cxx') diff --git a/src/Permission.cxx b/src/Permission.cxx index f53465b83..dafa4e00c 100644 --- a/src/Permission.cxx +++ b/src/Permission.cxx @@ -88,15 +88,17 @@ void initPermissions(void) do { const char *separator = - strchr(param->value, PERMISSION_PASSWORD_CHAR); + strchr(param->value.c_str(), + PERMISSION_PASSWORD_CHAR); if (separator == NULL) FormatFatalError("\"%c\" not found in password string " "\"%s\", line %i", PERMISSION_PASSWORD_CHAR, - param->value, param->line); + param->value.c_str(), + param->line); - std::string password((const char *)param->value, separator); + std::string password(param->value.c_str(), separator); permission = parsePermissions(separator + 1); @@ -108,7 +110,7 @@ void initPermissions(void) param = config_get_param(CONF_DEFAULT_PERMS); if (param) - permission_default = parsePermissions(param->value); + permission_default = parsePermissions(param->value.c_str()); } int getPermissionFromPassword(char const* password, unsigned* permission) -- cgit v1.2.3