From: Jason Self Date: Mon, 28 Sep 2015 00:55:20 +0000 (-0700) Subject: Bugfix SKEIN_DEEP_DUMP printing. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0e0c268cb3ec954f4387beaacf45139f12b64a59;p=skeinsum.git Bugfix SKEIN_DEEP_DUMP printing. --- diff --git a/SHA3api_ref.c b/SHA3api_ref.c index 19858c1..cab5c69 100644 --- a/SHA3api_ref.c +++ b/SHA3api_ref.c @@ -118,17 +118,17 @@ HashReturn Hash(int hashbitlen, const BitSequence *data, /* all-in-one call */ { /* these calls do not fail when called properly */ r = Update(&state,data,databitlen); Final(&state,hashval); - } #ifdef SKEIN_DEBUG - if (r == SUCCESS && getenv("SKEIN_DEEP_DUMP")) - { - printf("==== Hashbitlen = %d, DataBitLen = %llu, Data:\n%s\n==== Hash:\n", - hashbitlen, (long long unsigned)databitlen, (const char*)data); - int i; - for (i = 0; i < hashbitlen / 8; i++) - printf("%02X", hashval[i]); - } - printf("\n"); + if (r == SUCCESS && getenv("SKEIN_DEEP_DUMP")) + { + int i; + printf("==== Hashbitlen = %d, DataBitLen = %llu, Data:\n%s\n==== Hash:\n", + hashbitlen, (long long unsigned)databitlen, (const char*)data); + for (i = 0; i < hashbitlen / 8; i++) + printf("%02X", hashval[i]); + printf("\n"); + } #endif + } return r; }