Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
libdvdcss
Commits
2a2ce58b
Commit
2a2ce58b
authored
Oct 31, 2014
by
Diego Biurrun
Browse files
Replace sizeof(type) by sizeof(*variable).
parent
f13b902b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/css.c
View file @
2a2ce58b
...
...
@@ -205,7 +205,7 @@ int dvdcss_title ( dvdcss_t dvdcss, int i_block )
&&
p_title
->
i_startlb
==
i_block
)
{
/* We've already cracked this key, nothing to do */
memcpy
(
dvdcss
->
css
.
p_title_key
,
p_title
->
p_key
,
sizeof
(
dvd
_key
_t
)
);
memcpy
(
dvdcss
->
css
.
p_title_key
,
p_title
->
p_key
,
sizeof
(
*
p_title
->
p
_key
)
);
return
0
;
}
...
...
@@ -296,7 +296,7 @@ int dvdcss_title ( dvdcss_t dvdcss, int i_block )
p_title
=
p_newtitle
;
/* Write in the new title and its key */
p_newtitle
=
malloc
(
sizeof
(
dvd_
title
_t
)
);
p_newtitle
=
malloc
(
sizeof
(
*
p_new
title
)
);
if
(
p_newtitle
==
NULL
)
{
return
-
1
;
...
...
@@ -1086,7 +1086,7 @@ static int DecryptDiscKey( dvdcss_t dvdcss, const uint8_t *p_struct_disckey,
unsigned
int
i
,
n
=
0
;
/* Decrypt disc key with the above player keys */
for
(
n
=
0
;
n
<
sizeof
(
player_keys
)
/
sizeof
(
dvd
_key
_t
);
n
++
)
for
(
n
=
0
;
n
<
sizeof
(
player_keys
)
/
sizeof
(
*
player
_key
s
);
n
++
)
{
PrintKey
(
dvdcss
,
"trying player key "
,
player_keys
[
n
]
);
...
...
@@ -1205,7 +1205,7 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key )
}
/* Initializing our really big table */
BigTable
=
calloc
(
16777216
,
sizeof
(
int
)
);
BigTable
=
calloc
(
16777216
,
sizeof
(
*
BigTable
)
);
if
(
BigTable
==
NULL
)
{
free
(
K1table
);
...
...
src/libdvdcss.c
View file @
2a2ce58b
...
...
@@ -161,7 +161,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
#endif
/* Allocate the library structure. */
dvdcss_t
dvdcss
=
malloc
(
sizeof
(
struct
dvdcss
_s
)
);
dvdcss_t
dvdcss
=
malloc
(
sizeof
(
*
dvdcss
)
);
if
(
dvdcss
==
NULL
)
{
return
NULL
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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