Initializing uninitialized variable.
This commit is contained in:
parent
cfde84b15c
commit
e394723fb6
2 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue