Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d989de20
Commit
d989de20
authored
Jun 07, 2003
by
Jörn Engel
Committed by
Linus Torvalds
Jun 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] zlib cleanup: unnecessary cast removal
This removes unnecessary NULL casting.
parent
f7bb70ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
lib/zlib_deflate/deflate.c
lib/zlib_deflate/deflate.c
+1
-1
lib/zlib_inflate/infblock.c
lib/zlib_inflate/infblock.c
+1
-1
lib/zlib_inflate/inftrees.c
lib/zlib_inflate/inftrees.c
+4
-5
No files found.
lib/zlib_deflate/deflate.c
View file @
d989de20
...
@@ -968,7 +968,7 @@ static void fill_window(s)
...
@@ -968,7 +968,7 @@ static void fill_window(s)
#define FLUSH_BLOCK_ONLY(s, eof) { \
#define FLUSH_BLOCK_ONLY(s, eof) { \
zlib_tr_flush_block(s, (s->block_start >= 0L ? \
zlib_tr_flush_block(s, (s->block_start >= 0L ? \
(char *)&s->window[(unsigned)s->block_start] : \
(char *)&s->window[(unsigned)s->block_start] : \
(char *)
NULL), \
NULL), \
(ulg)((long)s->strstart - s->block_start), \
(ulg)((long)s->strstart - s->block_start), \
(eof)); \
(eof)); \
s->block_start = s->strstart; \
s->block_start = s->strstart; \
...
...
lib/zlib_inflate/infblock.c
View file @
d989de20
...
@@ -80,7 +80,7 @@ void zlib_inflate_blocks_reset(
...
@@ -80,7 +80,7 @@ void zlib_inflate_blocks_reset(
s
->
bitb
=
0
;
s
->
bitb
=
0
;
s
->
read
=
s
->
write
=
s
->
window
;
s
->
read
=
s
->
write
=
s
->
window
;
if
(
s
->
checkfn
!=
NULL
)
if
(
s
->
checkfn
!=
NULL
)
z
->
adler
=
s
->
check
=
(
*
s
->
checkfn
)(
0L
,
(
const
Byte
*
)
NULL
,
0
);
z
->
adler
=
s
->
check
=
(
*
s
->
checkfn
)(
0L
,
NULL
,
0
);
}
}
inflate_blocks_statef
*
zlib_inflate_blocks_new
(
inflate_blocks_statef
*
zlib_inflate_blocks_new
(
...
...
lib/zlib_inflate/inftrees.c
View file @
d989de20
...
@@ -139,7 +139,7 @@ static int huft_build(
...
@@ -139,7 +139,7 @@ static int huft_build(
}
while
(
--
i
);
}
while
(
--
i
);
if
(
c
[
0
]
==
n
)
/* null input--all zero length codes */
if
(
c
[
0
]
==
n
)
/* null input--all zero length codes */
{
{
*
t
=
(
inflate_huft
*
)
NULL
;
*
t
=
NULL
;
*
m
=
0
;
*
m
=
0
;
return
Z_OK
;
return
Z_OK
;
}
}
...
@@ -193,8 +193,8 @@ static int huft_build(
...
@@ -193,8 +193,8 @@ static int huft_build(
p
=
v
;
/* grab values in bit order */
p
=
v
;
/* grab values in bit order */
h
=
-
1
;
/* no tables yet--level -1 */
h
=
-
1
;
/* no tables yet--level -1 */
w
=
-
l
;
/* bits decoded == (l * h) */
w
=
-
l
;
/* bits decoded == (l * h) */
u
[
0
]
=
(
inflate_huft
*
)
NULL
;
/* just to keep compilers happy */
u
[
0
]
=
NULL
;
/* just to keep compilers happy */
q
=
(
inflate_huft
*
)
NULL
;
/* ditto */
q
=
NULL
;
/* ditto */
z
=
0
;
/* ditto */
z
=
0
;
/* ditto */
/* go through the bit lengths (k already is bits in shortest code) */
/* go through the bit lengths (k already is bits in shortest code) */
...
@@ -302,8 +302,7 @@ int zlib_inflate_trees_bits(
...
@@ -302,8 +302,7 @@ int zlib_inflate_trees_bits(
uInt
*
v
;
/* work area for huft_build */
uInt
*
v
;
/* work area for huft_build */
v
=
WS
(
z
)
->
tree_work_area_1
;
v
=
WS
(
z
)
->
tree_work_area_1
;
r
=
huft_build
(
c
,
19
,
19
,
(
uInt
*
)
NULL
,
(
uInt
*
)
NULL
,
r
=
huft_build
(
c
,
19
,
19
,
NULL
,
NULL
,
tb
,
bb
,
hp
,
&
hn
,
v
);
tb
,
bb
,
hp
,
&
hn
,
v
);
if
(
r
==
Z_DATA_ERROR
)
if
(
r
==
Z_DATA_ERROR
)
z
->
msg
=
(
char
*
)
"oversubscribed dynamic bit lengths tree"
;
z
->
msg
=
(
char
*
)
"oversubscribed dynamic bit lengths tree"
;
else
if
(
r
==
Z_BUF_ERROR
||
*
bb
==
0
)
else
if
(
r
==
Z_BUF_ERROR
||
*
bb
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment