From d6534d9069a286563e5549f96d9cd3e31149d328 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Mar 2019 23:59:55 -1100 Subject: [PATCH] Syntax --- src/cc/cclib.cpp | 2 +- src/cc/dilithium.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/cclib.cpp b/src/cc/cclib.cpp index 695ccd16b..3a6fba108 100644 --- a/src/cc/cclib.cpp +++ b/src/cc/cclib.cpp @@ -506,7 +506,7 @@ int64_t AddCClibInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubK int64_t AddCClibtxfee(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk) { - char coinaddr[64]; int64_t txfee = 10000; uint256 txid,hashBlock; CTransaction vintx; int32_t vout; + char coinaddr[64]; int64_t nValue,txfee = 10000; uint256 txid,hashBlock; CTransaction vintx; int32_t vout; std::vector > unspentOutputs; GetCCaddress(cp,coinaddr,pk); SetCCunspents(unspentOutputs,coinaddr); diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index 4136b0bca..8cfc85028 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -2941,10 +2941,10 @@ struct dilithium_handle *dilithium_handlenew(std::string handle) struct dilithium_handle *hashstr = 0; if ( handle.size() < sizeof(Dilithium_handles[0].handle)-1 ) { - HASH_FIND(hh,Dilithium_handles,handle,(int32_t)handle.size(),hashstr); + HASH_FIND(hh,Dilithium_handles,handle.c_str(),(int32_t)handle.size(),hashstr); if ( hashstr == 0 ) { - hashstr = calloc(1,sizeof(*hashstr)); + hashstr = (struct dilithium_handle *)calloc(1,sizeof(*hashstr)); strncpy(hashstr->handle,handle.c_str(),sizeof(hashstr->handle)); HASH_ADD_KEYPTR(hh,Dilithium_handles,hashstr->handle,(int32_t)handle.size(),hashstr); }