mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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
|
|
@ -434,7 +434,7 @@ on_setup_io(void *data, int fd, uint32_t mask)
|
|||
if (len < (int)sizeof(params))
|
||||
goto short_packet;
|
||||
|
||||
if (strcmp(params.type, "params") != 0)
|
||||
if (strncmp(params.type, "params", sizeof(params.type)) != 0)
|
||||
goto wrong_type;
|
||||
|
||||
switch(ntohl(params.packet_id)) {
|
||||
|
|
@ -1072,7 +1072,7 @@ on_socket_io(void *data, int fd, uint32_t mask)
|
|||
if (len < (int)sizeof(params))
|
||||
goto short_packet;
|
||||
|
||||
if (strcmp(params.type, "params") != 0)
|
||||
if (strncmp(params.type, "params", sizeof(params.type)) != 0)
|
||||
goto wrong_type;
|
||||
|
||||
switch(ntohl(params.packet_id)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue