summaryrefslogtreecommitdiff
path: root/src/stasis/plugin_anastasis_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-12 21:52:18 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-12 21:52:18 +0200
commit257c5a12043fd6a05ce2bf8aaa19fcf90eb10a78 (patch)
tree38c115b7c511450348d4c8acaca627a9a57d10a5 /src/stasis/plugin_anastasis_postgres.c
parentadf5df0e1a05adc1abbbfdcd62385db89c9aa00c (diff)
downloadanastasis-257c5a12043fd6a05ce2bf8aaa19fcf90eb10a78.tar.gz
anastasis-257c5a12043fd6a05ce2bf8aaa19fcf90eb10a78.tar.bz2
anastasis-257c5a12043fd6a05ce2bf8aaa19fcf90eb10a78.zip
-make meta data mandatory
Diffstat (limited to 'src/stasis/plugin_anastasis_postgres.c')
-rw-r--r--src/stasis/plugin_anastasis_postgres.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/stasis/plugin_anastasis_postgres.c b/src/stasis/plugin_anastasis_postgres.c
index bfe86da..709228f 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -1030,10 +1030,8 @@ postgres_store_recovery_document (
GNUNET_PQ_query_param_auto_from_type (recovery_data_hash),
GNUNET_PQ_query_param_fixed_size (recovery_data,
recovery_data_size),
- (NULL == recovery_meta_data)
- ? GNUNET_PQ_query_param_null ()
- : GNUNET_PQ_query_param_fixed_size (recovery_meta_data,
- recovery_meta_data_size),
+ GNUNET_PQ_query_param_fixed_size (recovery_meta_data,
+ recovery_meta_data_size),
GNUNET_PQ_query_param_timestamp (&now),
GNUNET_PQ_query_param_end
};
@@ -2251,20 +2249,17 @@ meta_iterator (void *cls,
for (unsigned int i = 0; i<num_results; i++)
{
uint32_t version;
- void *meta_data = NULL;
- size_t meta_data_size = 0;
+ void *meta_data;
+ size_t meta_data_size;
struct GNUNET_TIME_Timestamp ts;
- bool unused = false;
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_uint32 ("version",
&version),
GNUNET_PQ_result_spec_timestamp ("creation_date",
&ts),
- GNUNET_PQ_result_spec_allow_null (
- GNUNET_PQ_result_spec_variable_size ("recovery_meta_data",
- &meta_data,
- &meta_data_size),
- &unused),
+ GNUNET_PQ_result_spec_variable_size ("recovery_meta_data",
+ &meta_data,
+ &meta_data_size),
GNUNET_PQ_result_spec_end
};
enum GNUNET_GenericReturnValue ret;