gzip: Use 0x%04x instead of %x when printing 16-bit checksums
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Aug 2010 22:50:12 +0000 (15:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Aug 2010 22:50:29 +0000 (15:50 -0700)
* gzip.c (get_method): Use 0x%04x, not %x, to print 16-bit checksums.
Inspired by a suggestion of Greg Roelofs in
http://lists.gnu.org/archive/html/bug-gzip/2010-08/msg00004.html

gzip.c

diff --git a/gzip.c b/gzip.c
index 65f58977be682954edc2919e139293b1245abe13..d42bfa857e1dc70f45a6fcd3d106cc5e43c5c126 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -1420,7 +1420,7 @@ local int get_method(in)
             if (header16 != crc16)
               {
                 fprintf (stderr,
-                         "%s: %s: header checksum %x != computed checksum %x\n",
+                         "%s: %s: header checksum 0x%04x != computed checksum 0x%04x\n",
                          program_name, ifname, header16, crc16);
                 exit_code = ERROR;
                 if (force <= 1)