From: David Barksdale Date: Tue, 23 Dec 2014 04:55:01 +0000 (+0000) Subject: Remove work-around for bad NULL definition X-Git-Tag: initial-import-from-subversion-38251~2772 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8bcc9eb56238a7e63655ffc229363f0aaee5b0fd;p=oweals%2Fgnunet.git Remove work-around for bad NULL definition --- diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 1bf632854..d69cc47a3 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c @@ -1447,7 +1447,7 @@ handle_client_disconnect (void *cls, line = GNUNET_SERVER_client_get_user_context (client, struct Line); if (NULL == line) return; - GNUNET_SERVER_client_set_user_context (client, (void *)NULL); + GNUNET_SERVER_client_set_user_context (client, NULL); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client disconnected, closing line\n"); GNUNET_CONTAINER_DLL_remove (lines_head, @@ -1479,7 +1479,7 @@ do_shutdown (void *cls, GNUNET_CONTAINER_DLL_remove (lines_head, lines_tail, line); - GNUNET_SERVER_client_set_user_context (line->client, (void *) NULL); + GNUNET_SERVER_client_set_user_context (line->client, NULL); GNUNET_free (line); } if (NULL != cadet) diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index d9eae6a09..57cdbc5f5 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c @@ -259,7 +259,7 @@ shutdown_task (void *cls, GNUNET_SERVER_notification_context_destroy (nc); while (NULL != (clh = clh_head)) { - GNUNET_SERVER_client_set_user_context (clh->client, (void *)NULL); + GNUNET_SERVER_client_set_user_context (clh->client, NULL); GNS_resolver_lookup_cancel (clh->lookup); GNUNET_CONTAINER_DLL_remove (clh_head, clh_tail, clh); GNUNET_free (clh); @@ -706,7 +706,7 @@ send_lookup_response (void* cls, GNUNET_NO); GNUNET_free (rmsg); GNUNET_CONTAINER_DLL_remove (clh_head, clh_tail, clh); - GNUNET_SERVER_client_set_user_context (clh->client, (void *)NULL); + GNUNET_SERVER_client_set_user_context (clh->client, NULL); GNUNET_free (clh); GNUNET_STATISTICS_update (statistics, "Completed lookups", 1, diff --git a/src/namecache/gnunet-service-namecache.c b/src/namecache/gnunet-service-namecache.c index 0b3ece1f4..701bac4ae 100644 --- a/src/namecache/gnunet-service-namecache.c +++ b/src/namecache/gnunet-service-namecache.c @@ -122,7 +122,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) while (NULL != (nc = client_head)) { GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); - GNUNET_SERVER_client_set_user_context (nc->client, (void *)NULL); + GNUNET_SERVER_client_set_user_context (nc->client, NULL); GNUNET_free (nc); } GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, GSN_database)); diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 7def61886..1f4226297 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -304,7 +304,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_free (no); } GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); - GNUNET_SERVER_client_set_user_context (nc->client, (void *)NULL); + GNUNET_SERVER_client_set_user_context (nc->client, NULL); GNUNET_free (nc); } GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, GSN_database)); diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c index a003d6aab..03770144d 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c @@ -261,7 +261,7 @@ destroy_service_session (struct AliceServiceSession *s) if (NULL != s->client) { GNUNET_SERVER_client_set_user_context (s->client, - (void *)NULL); + NULL); GNUNET_SERVER_client_disconnect (s->client); s->client = NULL; } @@ -1356,7 +1356,7 @@ handle_client_disconnect (void *cls, return; s->client = NULL; GNUNET_SERVER_client_set_user_context (client, - (void *)NULL); + NULL); destroy_service_session (s); } diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 664dcbb7d..021a647ad 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -837,7 +837,7 @@ tcp_plugin_disconnect_session (void *cls, } if (NULL != session->client) GNUNET_SERVER_client_set_user_context (session->client, - (void *) NULL); + NULL); /* clean up state */ if (NULL != session->transmit_handle)