summaryrefslogtreecommitdiff
path: root/src/util/tv_age_restriction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/tv_age_restriction.c')
-rw-r--r--src/util/tv_age_restriction.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/util/tv_age_restriction.c b/src/util/tv_age_restriction.c
index 2bddb9d1b..9fc2b4823 100644
--- a/src/util/tv_age_restriction.c
+++ b/src/util/tv_age_restriction.c
@@ -34,16 +34,12 @@ get_age_group (
/**
* Encodes the age mask into a string, like "8:10:12:14:16:18:21"
- *
- * @param mask Age mask
- * @return String representation of the age mask, allocated by GNUNET_malloc.
- * Can be used as value in the TALER config.
*/
char *
age_mask_to_string (
- const struct TALER_AgeMask *m)
+ const struct TALER_AgeMask *mask)
{
- uint32_t bits = m->bits;
+ uint32_t bits = mask->bits;
unsigned int n = 0;
char *buf = GNUNET_malloc (32 * 3); // max characters possible
char *pos = buf;
@@ -162,7 +158,7 @@ generate (
sizeof(seed));
json_object_set (j_top,
- "commited_age",
+ "committed_age",
json_integer (age));
ret = TALER_age_restriction_commit (mask,
@@ -179,8 +175,6 @@ generate (
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&salt,
sizeof (salt));
- uint64_t salt = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
- UINT64_MAX / 2);
GNUNET_assert (GNUNET_OK ==
TALER_age_commitment_derive (&acp[i],
&salt,
@@ -216,7 +210,7 @@ generate (
"not required: age group is 0");
else if (min_group > age_group)
j_reason = json_string (
- "not applicable: commited age too small");
+ "not applicable: committed age too small");
else
j_reason = GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto (NULL, &at));