mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 03:55:05 +00:00
Fix HEADER_SIZE check, fix static_assert fallback
This commit is contained in:
parent
2088adcdc1
commit
1aa0ea60da
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
#include "util/str_util.h"
|
||||
|
||||
#ifndef static_assert
|
||||
#define static_assert(x, msg) (void) sizeof(struct {int a[(x) ? 1 : -1]})
|
||||
#define static_assert(x, msg) (void) sizeof(struct {int a[(x) ? 1 : -1]; })
|
||||
#endif
|
||||
|
||||
void
|
||||
|
|
|
@ -36,7 +36,7 @@ stream_recv_packet(struct stream *stream, AVPacket *packet) {
|
|||
|
||||
uint8_t header[HEADER_SIZE];
|
||||
size_t r = net_recv_all(stream->socket, header, HEADER_SIZE);
|
||||
if (r < HEADER_SIZE) {
|
||||
if (r == (size_t)-1 || r < HEADER_SIZE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue