From: Christian Grothoff Date: Fri, 11 Jun 2010 13:40:49 +0000 (+0000) Subject: simplify X-Git-Tag: initial-import-from-subversion-38251~21418 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=202e0c0997a3974e68c526d242db3962263d3226;p=oweals%2Fgnunet.git simplify --- diff --git a/src/util/configuration.c b/src/util/configuration.c index a244d5f01..d033e0a72 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -804,26 +804,20 @@ GNUNET_CONFIGURATION_get_value_filename (const struct const char *section, const char *option, char **value) { - int ret; char *tmp; - tmp = NULL; - ret = GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &tmp); - if (ret == GNUNET_SYSERR) - return ret; - if (tmp != NULL) - { - tmp = GNUNET_CONFIGURATION_expand_dollar (cfg, tmp); - *value = GNUNET_STRINGS_filename_expand (tmp); - GNUNET_free (tmp); - if (*value == NULL) - ret = GNUNET_SYSERR; - } - else + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &tmp)) { *value = NULL; + return GNUNET_SYSERR; } - return ret; + tmp = GNUNET_CONFIGURATION_expand_dollar (cfg, tmp); + *value = GNUNET_STRINGS_filename_expand (tmp); + GNUNET_free (tmp); + if (*value == NULL) + return GNUNET_SYSERR; + return GNUNET_OK; }