mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: small cleanups
Initialize result variable. Use strncpy to avoid warnings about using non-NULL terminaded strings.
This commit is contained in:
parent
15908328d1
commit
d0a2e6316b
7 changed files with 9 additions and 9 deletions
|
|
@ -663,7 +663,7 @@ static inline int32_t netjack2_driver_sync_wait(struct netjack2_peer *peer)
|
|||
if (len >= (ssize_t)sizeof(sync)) {
|
||||
//nj2_dump_packet_header(&sync);
|
||||
|
||||
if (strcmp(sync.type, "header") == 0 &&
|
||||
if (strncmp(sync.type, "header", sizeof(sync.type)) == 0 &&
|
||||
ntohl(sync.data_type) == 's' &&
|
||||
ntohl(sync.data_stream) == peer->other_stream &&
|
||||
ntohl(sync.id) == peer->params.id)
|
||||
|
|
@ -695,7 +695,7 @@ static inline int32_t netjack2_manager_sync_wait(struct netjack2_peer *peer)
|
|||
if (len >= (ssize_t)sizeof(sync)) {
|
||||
//nj2_dump_packet_header(sync);
|
||||
|
||||
if (strcmp(sync.type, "header") == 0 &&
|
||||
if (strncmp(sync.type, "header", sizeof(sync.type)) == 0 &&
|
||||
ntohl(sync.data_type) == 's' &&
|
||||
ntohl(sync.data_stream) == peer->other_stream &&
|
||||
ntohl(sync.id) == peer->params.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue