]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(md5_file): Initialize two elements of LEN portably,
authorJim Meyering <jim@meyering.net>
Tue, 20 Jun 1995 12:00:55 +0000 (12:00 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 20 Jun 1995 12:00:55 +0000 (12:00 +0000)
rather than with ANSI aggregate initialization.  Reported by
Edzer Pebesma <Edzer.Pebesma@rivm.nl>.

src/md5sum.c

index cb292aa4c43a43c389ac67eb422d88afbdd630b8..349bd77384b77ecc02dce792498acacb5b673c5b 100644 (file)
@@ -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)
     {