aboutsummaryrefslogtreecommitdiff
path: root/src/extensions
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-06-26 17:40:10 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-06-26 17:40:10 +0200
commita55fc45126b13de56a76a44f629a73b1eb003408 (patch)
treee5578ad70737167ea3194d808199f949d256582d /src/extensions
parent9865febb17718a95f6444591ecdc5b09259a556c (diff)
-fix valgrind complaints
Diffstat (limited to 'src/extensions')
-rw-r--r--src/extensions/extension_age_restriction.c2
-rw-r--r--src/extensions/extensions.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/extensions/extension_age_restriction.c b/src/extensions/extension_age_restriction.c
index 9acc5dcbf..fedf12d44 100644
--- a/src/extensions/extension_age_restriction.c
+++ b/src/extensions/extension_age_restriction.c
@@ -79,7 +79,7 @@ TALER_parse_age_group_string (
return GNUNET_SYSERR;
}
- if (0>val || 32<=val || prev>=val)
+ if (32<=val || prev>=val)
return GNUNET_SYSERR;
mask->bits |= (1 << val);
diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c
index 55a7dcd81..0df0bae36 100644
--- a/src/extensions/extensions.c
+++ b/src/extensions/extensions.c
@@ -38,7 +38,7 @@ TALER_extensions_get_head ()
enum GNUNET_GenericReturnValue
TALER_extensions_add (
- const struct TALER_Extension *extension)
+ struct TALER_Extension *extension)
{
/* Sanity checks */
if ((NULL == extension) ||
@@ -60,10 +60,12 @@ TALER_extensions_add (
else
{
struct TALER_Extension *iter;
+ struct TALER_Extension *last;
/* Check for collisions */
for (iter = TE_extensions; NULL != iter; iter = iter->next)
{
+ last = iter;
if (extension->type == iter->type ||
0 == strcasecmp (extension->name,
iter->name))
@@ -76,7 +78,7 @@ TALER_extensions_add (
}
/* No collisions found, so add this extension to the list */
- iter->next = (struct TALER_Extension *) extension;
+ last->next = extension;
}
return GNUNET_OK;