[PATCH 1/5] lib/zlib: remove trailing spaces and tabs

From: Zhen Lei
Date: Tue Jun 08 2021 - 03:11:44 EST


Run the following command to find and remove the trailing spaces and tabs:

find lib/zlib*/ -type f | xargs sed -r -i 's/[ \t]+$//'

Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
---
lib/zlib_deflate/deflate.c | 10 +++++-----
lib/zlib_deflate/deftree.c | 4 ++--
lib/zlib_deflate/defutil.h | 10 +++++-----
lib/zlib_inflate/inflate_syms.c | 2 +-
lib/zlib_inflate/infutil.h | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c
index 3fa66fc7fbd7..d7397366edea 100644
--- a/lib/zlib_deflate/deflate.c
+++ b/lib/zlib_deflate/deflate.c
@@ -1,7 +1,7 @@
/* +++ deflate.c */
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
+ * For conditions of distribution and use, see copyright notice in zlib.h
*/

/*
@@ -284,7 +284,7 @@ int zlib_deflateReset(
)
{
deflate_state *s;
-
+
if (strm == NULL || strm->state == NULL)
return Z_STREAM_ERROR;

@@ -323,7 +323,7 @@ static void putShortMSB(
{
put_byte(s, (Byte)(b >> 8));
put_byte(s, (Byte)(b & 0xff));
-}
+}

/* ========================================================================= */
int zlib_deflate(
@@ -976,7 +976,7 @@ static block_state deflate_fast(
* always MIN_MATCH bytes ahead.
*/
} while (--s->match_length != 0);
- s->strstart++;
+ s->strstart++;
} else {
s->strstart += s->match_length;
s->match_length = 0;
@@ -994,7 +994,7 @@ static block_state deflate_fast(
Tracevv((stderr,"%c", s->window[s->strstart]));
bflush = zlib_tr_tally (s, 0, s->window[s->strstart]);
s->lookahead--;
- s->strstart++;
+ s->strstart++;
}
if (bflush) FLUSH_BLOCK(s, 0);
}
diff --git a/lib/zlib_deflate/deftree.c b/lib/zlib_deflate/deftree.c
index a4a34da512fe..31b18220fef7 100644
--- a/lib/zlib_deflate/deftree.c
+++ b/lib/zlib_deflate/deftree.c
@@ -1,7 +1,7 @@
/* +++ trees.c */
/* trees.c -- output deflated data using Huffman coding
* Copyright (C) 1995-1996 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
+ * For conditions of distribution and use, see copyright notice in zlib.h
*/

/*
@@ -1043,7 +1043,7 @@ static void copy_block(
s->last_eob_len = 8; /* enough lookahead for inflate */

if (header) {
- put_short(s, (ush)len);
+ put_short(s, (ush)len);
put_short(s, (ush)~len);
#ifdef DEBUG_ZLIB
s->bits_sent += 2*16;
diff --git a/lib/zlib_deflate/defutil.h b/lib/zlib_deflate/defutil.h
index 385333b22ec6..c33cec1b38db 100644
--- a/lib/zlib_deflate/defutil.h
+++ b/lib/zlib_deflate/defutil.h
@@ -3,11 +3,11 @@

#include <linux/zutil.h>

-#define Assert(err, str)
-#define Trace(dummy)
-#define Tracev(dummy)
-#define Tracecv(err, dummy)
-#define Tracevv(dummy)
+#define Assert(err, str)
+#define Trace(dummy)
+#define Tracev(dummy)
+#define Tracecv(err, dummy)
+#define Tracevv(dummy)



diff --git a/lib/zlib_inflate/inflate_syms.c b/lib/zlib_inflate/inflate_syms.c
index 9720114c0672..31b435f28b73 100644
--- a/lib/zlib_inflate/inflate_syms.c
+++ b/lib/zlib_inflate/inflate_syms.c
@@ -16,6 +16,6 @@ EXPORT_SYMBOL(zlib_inflate);
EXPORT_SYMBOL(zlib_inflateInit2);
EXPORT_SYMBOL(zlib_inflateEnd);
EXPORT_SYMBOL(zlib_inflateReset);
-EXPORT_SYMBOL(zlib_inflateIncomp);
+EXPORT_SYMBOL(zlib_inflateIncomp);
EXPORT_SYMBOL(zlib_inflate_blob);
MODULE_LICENSE("GPL");
diff --git a/lib/zlib_inflate/infutil.h b/lib/zlib_inflate/infutil.h
index 784ab33b7842..22b927c4122d 100644
--- a/lib/zlib_inflate/infutil.h
+++ b/lib/zlib_inflate/infutil.h
@@ -1,6 +1,6 @@
/* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
+ * For conditions of distribution and use, see copyright notice in zlib.h
*/

/* WARNING: this file should *not* be used by applications. It is
--
2.25.1