aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-02 13:31:02 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-02 13:31:02 +0200
commit5d1e2bed2cd01c4d14a6044c811fea539d39300b (patch)
treeed2d0851d3be47eee1fdefb5fd92292f07f7f8ba
parentcbe3743f496b383947644a2bc6c5c1bf03612dce (diff)
downloadgnunet-5d1e2bed2cd01c4d14a6044c811fea539d39300b.tar.gz
gnunet-5d1e2bed2cd01c4d14a6044c811fea539d39300b.zip
-allow NULL
-rw-r--r--src/pq/pq_connect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 4e614526b..b06a591cf 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -294,7 +294,7 @@ GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db)
294void 294void
295GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) 295GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db)
296{ 296{
297 if (NULL != db->sc) 297 if (NULL != db->sc)
298 db->sc (db->sc_cls, 298 db->sc (db->sc_cls,
299 -1); 299 -1);
300 if (NULL != db->conn) 300 if (NULL != db->conn)
@@ -468,6 +468,8 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
468void 468void
469GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) 469GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
470{ 470{
471 if (NULL == db)
472 return;
471 GNUNET_assert (0 == 473 GNUNET_assert (0 ==
472 GNUNET_CONTAINER_multishortmap_size (db->channel_map)); 474 GNUNET_CONTAINER_multishortmap_size (db->channel_map));
473 GNUNET_CONTAINER_multishortmap_destroy (db->channel_map); 475 GNUNET_CONTAINER_multishortmap_destroy (db->channel_map);