]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
from_header minor width cleanup
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Aug 2024 07:29:07 +0000 (00:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Aug 2024 08:41:43 +0000 (01:41 -0700)
* src/list.c (from_header): Use UINTMAX_WIDTH rather than
computing it by hand.

src/list.c

index f7f22c986a0d4d087030f89a8273643698eb2c15..c9717eb45c894846cc77f1d81d17dd72a4bdf420 100644 (file)
@@ -877,8 +877,7 @@ from_header (char const *where0, size_t digs, char const *type,
         others (assuming ASCII bytes of 8 bits or more).  */
       int signbit = *where & (1 << (LG_256 - 2));
       uintmax_t topbits = (((uintmax_t) - signbit)
-                          << (CHAR_BIT * sizeof (uintmax_t)
-                              - LG_256 - (LG_256 - 2)));
+                          << (UINTMAX_WIDTH - LG_256 - (LG_256 - 2)));
       value = (*where++ & ((1 << (LG_256 - 2)) - 1)) - signbit;
       for (;;)
        {