From d1bdcb2618b13c3289492347550feb3fcf1f812d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 3 Mar 2020 12:31:23 +0100 Subject: make static analysis happier --- src/util/configuration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util/configuration.c') diff --git a/src/util/configuration.c b/src/util/configuration.c index 0480ebd5d..7ed87cc1e 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -1241,7 +1241,7 @@ GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, * @param cfg configuration to use for path expansion * @param orig string to $-expand (will be freed!) * @param depth recursion depth, used to detect recursive expansions - * @return $-expanded string + * @return $-expanded string, never NULL unless @a orig was NULL */ static char * expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg, @@ -1421,6 +1421,7 @@ GNUNET_CONFIGURATION_expand_dollar ( continue; dup = GNUNET_strdup (orig + i); dup = expand_dollar (cfg, dup, 0); + GNUNET_assert (NULL != dup); /* make compiler happy */ len = strlen (dup) + 1; orig = GNUNET_realloc (orig, i + len); GNUNET_memcpy (orig + i, dup, len); -- cgit v1.2.3