diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:16:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:17:30 +0300 |
commit | 9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch) | |
tree | 0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/hash_md5.c | |
parent | 337eb8c1de4c57c34520b467d79779153335eecb (diff) |
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/hash_md5.c')
-rw-r--r-- | source/blender/blenlib/intern/hash_md5.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c index 895b558dc82..1a8e78d4227 100644 --- a/source/blender/blenlib/intern/hash_md5.c +++ b/source/blender/blenlib/intern/hash_md5.c @@ -316,19 +316,22 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock) sum += n; } while (sum < BLOCKSIZE && n != 0); - if (n == 0 && ferror(stream)) + if (n == 0 && ferror(stream)) { return 1; + } /* RFC 1321 specifies the possible length of the file up to 2^64 bits. * Here we only compute the number of bytes. Do a double word increment. */ len[0] += sum; - if (len[0] < sum) + if (len[0] < sum) { ++len[1]; + } /* If end of file is reached, end the loop. */ - if (n == 0) + if (n == 0) { break; + } /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0. */ md5_process_block(buffer, BLOCKSIZE, &ctx); |