mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-25 10:21:53 +00:00
Fix size_t incorrectly assigned to int
The function control_msg_serialize() returns a size_t.
This commit is contained in:
parent
8dbb1676b7
commit
94eff0a4bb
2 changed files with 14 additions and 14 deletions
|
@ -60,12 +60,12 @@ static bool
|
|||
process_msg(struct controller *controller,
|
||||
const struct control_msg *msg) {
|
||||
static unsigned char serialized_msg[CONTROL_MSG_MAX_SIZE];
|
||||
int length = control_msg_serialize(msg, serialized_msg);
|
||||
size_t length = control_msg_serialize(msg, serialized_msg);
|
||||
if (!length) {
|
||||
return false;
|
||||
}
|
||||
int w = net_send_all(controller->control_socket, serialized_msg, length);
|
||||
return w == length;
|
||||
return (size_t) w == length;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue