From: Jim Meyering Date: Tue, 20 Jun 1995 12:00:55 +0000 (+0000) Subject: (md5_file): Initialize two elements of LEN portably, X-Git-Tag: textutils-1_12_1~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59f93bf56c31431da79f81a932c6adbf8e88ef5c;p=thirdparty%2Fcoreutils.git (md5_file): Initialize two elements of LEN portably, rather than with ANSI aggregate initialization. Reported by Edzer Pebesma . --- diff --git a/src/md5sum.c b/src/md5sum.c index cb292aa4c4..349bd77384 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) {