diff options
author | Sami Kerola | 2011-07-20 22:13:32 +0200 |
---|---|---|
committer | Sami Kerola | 2011-07-21 23:56:48 +0200 |
commit | e429d141061d47c567b6790f3c7d9e51e8a356a7 (patch) | |
tree | 673b8cb4880f208a2152e327249fa3622ef01eae /tests/helpers | |
parent | mkfs.cramfs: use program_invocation_short_name (diff) | |
download | kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.tar.gz kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.tar.xz kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.zip |
md5: use symbolical digest length
Magic hash lenght number 16 is turned to a definition MD5LENGTH,
and put into use everywhere where md5 checksum is in use.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'tests/helpers')
-rw-r--r-- | tests/helpers/test_md5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/helpers/test_md5.c b/tests/helpers/test_md5.c index b99882b53..7f1e4f358 100644 --- a/tests/helpers/test_md5.c +++ b/tests/helpers/test_md5.c @@ -9,7 +9,7 @@ main(int argc, char *argv[]) { int i, ret; struct MD5Context ctx; - unsigned char digest[16]; + unsigned char digest[MD5LENGTH]; unsigned char buf[BUFSIZ]; MD5Init( &ctx ); @@ -23,7 +23,7 @@ main(int argc, char *argv[]) fclose(stdin); MD5Final( digest, &ctx ); - for (i = 0; i < 16; i++) + for (i = 0; i < MD5LENGTH; i++) printf( "%02x", digest[i] ); printf(" -\n"); return 0; |