Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3524d9e5
Commit
3524d9e5
authored
Dec 27, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: mmstu: fix signedness
parent
03f61eff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+8
-8
modules/access/mms/mmstu.h
modules/access/mms/mmstu.h
+2
-2
No files found.
modules/access/mms/mmstu.c
View file @
3524d9e5
...
@@ -1112,8 +1112,8 @@ static int NetFillBuffer( access_t *p_access )
...
@@ -1112,8 +1112,8 @@ static int NetFillBuffer( access_t *p_access )
}
}
#endif
#endif
if
(
i_tcp_read
>
0
)
p_sys
->
i_buffer_tcp
+=
i_tcp_read
;
if
(
i_tcp_read
>
0
)
p_sys
->
i_buffer_tcp
+=
(
size_t
)
i_tcp_read
;
if
(
i_udp_read
>
0
)
p_sys
->
i_buffer_udp
+=
i_udp_read
;
if
(
i_udp_read
>
0
)
p_sys
->
i_buffer_udp
+=
(
size_t
)
i_udp_read
;
return
i_tcp_read
+
i_udp_read
;
return
i_tcp_read
+
i_udp_read
;
}
}
...
@@ -1121,7 +1121,7 @@ static int NetFillBuffer( access_t *p_access )
...
@@ -1121,7 +1121,7 @@ static int NetFillBuffer( access_t *p_access )
static
int
mms_ParseCommand
(
access_t
*
p_access
,
static
int
mms_ParseCommand
(
access_t
*
p_access
,
uint8_t
*
p_data
,
uint8_t
*
p_data
,
size_t
i_data
,
size_t
i_data
,
in
t
*
pi_used
)
size_
t
*
pi_used
)
{
{
#define GET32( i_pos ) \
#define GET32( i_pos ) \
( p_sys->p_cmd[i_pos] + ( p_sys->p_cmd[i_pos +1] << 8 ) + \
( p_sys->p_cmd[i_pos] + ( p_sys->p_cmd[i_pos +1] << 8 ) + \
...
@@ -1200,7 +1200,7 @@ static int mms_ParseCommand( access_t *p_access,
...
@@ -1200,7 +1200,7 @@ static int mms_ParseCommand( access_t *p_access,
static
int
mms_ParsePacket
(
access_t
*
p_access
,
static
int
mms_ParsePacket
(
access_t
*
p_access
,
uint8_t
*
p_data
,
size_t
i_data
,
uint8_t
*
p_data
,
size_t
i_data
,
in
t
*
pi_used
)
size_
t
*
pi_used
)
{
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
int
i_packet_seq_num
;
int
i_packet_seq_num
;
...
@@ -1316,7 +1316,7 @@ static int mms_ReceivePacket( access_t *p_access )
...
@@ -1316,7 +1316,7 @@ static int mms_ReceivePacket( access_t *p_access )
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
4
)
==
0xb00bface
)
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
4
)
==
0xb00bface
)
{
{
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
8
)
+
16
<=
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
8
)
+
16
<=
(
uint32
_t
)
p_sys
->
i_buffer_tcp
)
(
size
_t
)
p_sys
->
i_buffer_tcp
)
{
{
b_refill
=
false
;
b_refill
=
false
;
}
}
...
@@ -1343,7 +1343,7 @@ static int mms_ReceivePacket( access_t *p_access )
...
@@ -1343,7 +1343,7 @@ static int mms_ReceivePacket( access_t *p_access )
if
(
p_sys
->
i_buffer_tcp
>
0
)
if
(
p_sys
->
i_buffer_tcp
>
0
)
{
{
in
t
i_used
;
size_
t
i_used
;
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
4
)
==
0xb00bface
)
if
(
GetDWLE
(
p_sys
->
buffer_tcp
+
4
)
==
0xb00bface
)
{
{
...
@@ -1367,7 +1367,7 @@ static int mms_ReceivePacket( access_t *p_access )
...
@@ -1367,7 +1367,7 @@ static int mms_ReceivePacket( access_t *p_access )
}
}
else
if
(
p_sys
->
i_buffer_udp
>
0
)
else
if
(
p_sys
->
i_buffer_udp
>
0
)
{
{
in
t
i_used
;
size_
t
i_used
;
i_packet_udp_type
=
i_packet_udp_type
=
mms_ParsePacket
(
p_access
,
p_sys
->
buffer_udp
,
mms_ParsePacket
(
p_access
,
p_sys
->
buffer_udp
,
...
@@ -1404,7 +1404,7 @@ static int mms_ReceiveCommand( access_t *p_access )
...
@@ -1404,7 +1404,7 @@ static int mms_ReceiveCommand( access_t *p_access )
for
(
;;
)
for
(
;;
)
{
{
in
t
i_used
;
size_
t
i_used
;
int
i_status
;
int
i_status
;
if
(
NetFillBuffer
(
p_access
)
<
0
)
if
(
NetFillBuffer
(
p_access
)
<
0
)
...
...
modules/access/mms/mmstu.h
View file @
3524d9e5
...
@@ -52,10 +52,10 @@ struct access_sys_t
...
@@ -52,10 +52,10 @@ struct access_sys_t
/* */
/* */
uint8_t
buffer_tcp
[
MMS_BUFFER_SIZE
];
uint8_t
buffer_tcp
[
MMS_BUFFER_SIZE
];
int
i_buffer_tcp
;
size_t
i_buffer_tcp
;
uint8_t
buffer_udp
[
MMS_BUFFER_SIZE
];
uint8_t
buffer_udp
[
MMS_BUFFER_SIZE
];
int
i_buffer_udp
;
size_t
i_buffer_udp
;
/* data necessary to send data to server */
/* data necessary to send data to server */
guid_t
guid
;
guid_t
guid
;
...
...
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