summaryrefslogtreecommitdiff
path: root/src/md5sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-06-20 12:00:55 +0000
committerJim Meyering <jim@meyering.net>1995-06-20 12:00:55 +0000
commit59f93bf56c31431da79f81a932c6adbf8e88ef5c (patch)
tree6fa7f4159018c40eaea683a0b250efb5bb893fd3 /src/md5sum.c
parent6ebaf82426c177a0d699c7a8d5985eb1b84a90f6 (diff)
downloadcoreutils-59f93bf56c31431da79f81a932c6adbf8e88ef5c.tar.xz
(md5_file): Initialize two elements of LEN portably,
rather than with ANSI aggregate initialization. Reported by Edzer Pebesma <Edzer.Pebesma@rivm.nl>.
Diffstat (limited to 'src/md5sum.c')
-rw-r--r--src/md5sum.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/md5sum.c b/src/md5sum.c
index cb292aa4c..349bd7738 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -506,7 +506,7 @@ md5_file (filename, resblock, binary)
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
struct md5_ctx ctx;
- uint32 len[2] = {0, 0};
+ uint32 len[2];
char buffer[BLOCKSIZE + 72];
size_t pad, sum;
FILETYPE f;
@@ -529,6 +529,9 @@ md5_file (filename, resblock, binary)
/* Initialize the computation context. */
init (&ctx);
+ len[0] = 0;
+ len[1] = 0;
+
/* Iterate over full file contents. */
while (1)
{