aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-11 13:40:49 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-11 13:40:49 +0000
commit202e0c0997a3974e68c526d242db3962263d3226 (patch)
treea081ec5bccf334606270f7cb362ab3b8bc0ea06e
parentde24f62f6916dcc6fd3b5464dc9fb2a72ca80bae (diff)
downloadgnunet-202e0c0997a3974e68c526d242db3962263d3226.tar.gz
gnunet-202e0c0997a3974e68c526d242db3962263d3226.zip
simplify
-rw-r--r--src/util/configuration.c24
1 files changed, 9 insertions, 15 deletions
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
804 const char *section, 804 const char *section,
805 const char *option, char **value) 805 const char *option, char **value)
806{ 806{
807 int ret;
808 char *tmp; 807 char *tmp;
809 808
810 tmp = NULL; 809 if (GNUNET_OK !=
811 ret = GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &tmp); 810 GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &tmp))
812 if (ret == GNUNET_SYSERR)
813 return ret;
814 if (tmp != NULL)
815 {
816 tmp = GNUNET_CONFIGURATION_expand_dollar (cfg, tmp);
817 *value = GNUNET_STRINGS_filename_expand (tmp);
818 GNUNET_free (tmp);
819 if (*value == NULL)
820 ret = GNUNET_SYSERR;
821 }
822 else
823 { 811 {
824 *value = NULL; 812 *value = NULL;
813 return GNUNET_SYSERR;
825 } 814 }
826 return ret; 815 tmp = GNUNET_CONFIGURATION_expand_dollar (cfg, tmp);
816 *value = GNUNET_STRINGS_filename_expand (tmp);
817 GNUNET_free (tmp);
818 if (*value == NULL)
819 return GNUNET_SYSERR;
820 return GNUNET_OK;
827} 821}
828 822
829 823