From e394723fb69f2b9cd69a8fbc53a84584d1ce4f31 Mon Sep 17 00:00:00 2001 From: jmjatlanta Date: Thu, 12 Oct 2017 12:57:20 -0500 Subject: [PATCH] Initializing uninitialized variable. --- core/http_request.c | 2 +- exchange/bitswap/engine.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/http_request.c b/core/http_request.c index 2d922e8..5d81eff 100644 --- a/core/http_request.c +++ b/core/http_request.c @@ -163,7 +163,7 @@ int ipfs_core_http_process_object(struct IpfsNode* local_node, struct HttpReques // do an object_get if (request->arguments->total == 1) { char* hash = (char*)libp2p_utils_vector_get(request->arguments, 0); - struct Cid* cid; + struct Cid* cid = NULL; ipfs_cid_decode_hash_from_base58((unsigned char*)hash, strlen(hash), &cid); *response = ipfs_core_http_response_new(); struct HttpResponse* res = *response; diff --git a/exchange/bitswap/engine.c b/exchange/bitswap/engine.c index 2efa264..bb6eb68 100644 --- a/exchange/bitswap/engine.c +++ b/exchange/bitswap/engine.c @@ -98,7 +98,6 @@ void* ipfs_bitswap_engine_peer_request_processor_start(void* ctx) { } else { // check the network to see if there is anything waiting for us (if the stream is idle) if (libp2p_stream_try_lock(current_peer_entry->sessionContext->default_stream)) { - libp2p_logger_error("bitswap_engine", "I have the lock for peer %s.\n", libp2p_peer_id_to_string(current_peer_entry)); int retVal = current_peer_entry->sessionContext->default_stream->peek(current_peer_entry->sessionContext); if (retVal < 0) { libp2p_logger_debug("bitswap_engine", "We thought we were connected, but Peek reported an error.\n");