Skip to content

Commit

Permalink
Fix misformatted code added in db45d67
Browse files Browse the repository at this point in the history
The entirety of the rest of the file uses 8-width tabs, but this[1]
change added 4-width spaces.

1. db45d67 ("Fix performance regression on processors that allow
   unaligned memory access. (cr-marcstevens#30)", 2017-05-18)
  • Loading branch information
avar committed May 19, 2017
1 parent b85e425 commit 07d5682
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,8 +1748,7 @@ void SHA1DCSetCallback(SHA1_CTX* ctx, collision_block_callback callback)
void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len)
{
unsigned left, fill;

const uint32_t* buffer_to_hash = NULL;
const uint32_t* buffer_to_hash = NULL;

if (len == 0)
return;
Expand All @@ -1771,10 +1770,10 @@ void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len)
ctx->total += 64;

#if defined(SHA1DC_ALLOW_UNALIGNED_ACCESS)
buffer_to_hash = (const uint32_t*)buf;
buffer_to_hash = (const uint32_t*)buf;
#else
buffer_to_hash = (const uint32_t*)ctx->buffer;
memcpy(ctx->buffer, buf, 64);
buffer_to_hash = (const uint32_t*)ctx->buffer;
memcpy(ctx->buffer, buf, 64);
#endif /* defined(SHA1DC_ALLOW_UNALIGNED_ACCESS) */
sha1_process(ctx, buffer_to_hash);
buf += 64;
Expand Down

0 comments on commit 07d5682

Please sign in to comment.