On 11/04/2024 4:25 pm, Daniel P. Smith wrote:
> This commit cleans up the comments and fixes the code alignment using Xen
> coding style. This is done to make the code more legible before refactoring.
>
> Signed-off-by: Daniel P. Smith <[email protected]>

I've found two more minor adjustments:

diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c
index feb6d51008aa..9205189d4618 100644
--- a/xen/common/gzip/inflate.c
+++ b/xen/common/gzip/inflate.c
@@ -375,7 +375,7 @@ static int __init huft_build(
     memzero(stk->c, sizeof(stk->c));
     p = b;  i = n;
     do {
-        Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" :
"0x%x %d\n"),
+        Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" :
"0x%x %d\n"),
                      n-i, *p));
         c[*p]++;                    /* assume all entries <= BMAX */
         p++;                      /* Can't combine with above line
(Solaris bug) */
@@ -563,7 +563,8 @@ static int __init huft_build(
     return ret;
 }
 
-/* Free the malloc'ed tables built by huft_build(), which makes a linked
+/*
+ * Free the malloc'ed tables built by huft_build(), which makes a linked
  * list of the tables it made, with the links in a dummy first entry of
  * each table.
  *


I can fold on commit.  (First hunk is trailing whitespace, which doesn't
show up so well on email).


However, there are some more major adjustments wanted too.

The reason why the code indention is so messed up is because it has been
auto-formatted, but with some NEXTBYTE()/NEEDBITS()/DUMPBITS() missing
semi-colons.  This throws off subsequent formatting, including some of
the indentation changes you've made.

Fixing the semicolons is a far more messy diff, but a much better end
result.

However, the PKZIP_BUG_WORKAROUND ifdefary hiding braces still throws
things off, this time in the opposite direction.  NOMEMCPY also gets in
the way.

I'd be tempted to suggest breaking out a patch earlier dropping these
two, and then doing the semicolon fixes in this one along with the other
work.

Thoughts?

~Andrew

Reply via email to