From 49e84a08e2bbdcc421a24bfe1ccd9cc15846fe2b Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 25 Jan 2012 15:09:34 +0000 Subject: [PATCH] - clang --- src/transport/plugin_transport_http.c | 4 ++-- src/transport/plugin_transport_http_server.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 0bfa82123..684612617 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -723,7 +723,7 @@ http_plugin_disconnect (void *cls, const struct GNUNET_PeerIdentity *target) GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); struct HTTP_Message *msg = s->msg_head; - struct HTTP_Message *tmp = s->msg_head; + struct HTTP_Message *tmp = NULL; while (msg != NULL) { @@ -1495,7 +1495,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); struct HTTP_Message *msg = s->msg_head; - struct HTTP_Message *tmp = s->msg_head; + struct HTTP_Message *tmp = NULL; while (msg != NULL) { diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 10c8268b1..3d09e866e 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -407,8 +407,11 @@ server_lookup_session (struct Plugin *plugin, if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) direction = _RECEIVE; - if (0 == strcmp (MHD_HTTP_METHOD_GET, method)) + else if (0 == strcmp (MHD_HTTP_METHOD_GET, method)) direction = _SEND; + else + GNUNET_break_op (0); + if (check == GNUNET_NO) goto error; @@ -672,7 +675,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, response = MHD_create_response_from_callback (-1, 32 * 1024, &server_send_callback, s, NULL); - res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); + MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); MHD_destroy_response (response); return MHD_YES; } @@ -714,7 +717,6 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, { s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); } - res = GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, *upload_data_size, GNUNET_NO, GNUNET_NO); @@ -781,7 +783,7 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection, void **httpSessionCache) { struct ServerConnection *sc = *httpSessionCache; - struct ServerConnection *tc = *httpSessionCache; + struct ServerConnection *tc = NULL; struct Session *s = NULL; struct Session *t = NULL; struct Plugin *plugin = NULL; @@ -1250,7 +1252,7 @@ server_stop (struct Plugin *plugin) #endif t = s->next; struct HTTP_Message *msg = s->msg_head; - struct HTTP_Message *tmp = s->msg_head; + struct HTTP_Message *tmp = NULL; while (msg != NULL) { -- 2.25.1