mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pass the complete buffer size to snprintf
There is no reason to pass size-1, snprintf will always put a \0 at the end.
This commit is contained in:
parent
41063578a5
commit
2b44f42845
13 changed files with 27 additions and 27 deletions
|
|
@ -128,7 +128,7 @@ static void node_port_init(void *data, struct pw_impl_port *port)
|
|||
|
||||
if ((str = pw_properties_get(old, PW_KEY_AUDIO_CHANNEL)) == NULL ||
|
||||
strcmp(str, "UNK") == 0) {
|
||||
snprintf(position, sizeof(position)-1, "%d", pw_impl_port_get_id(port));
|
||||
snprintf(position, sizeof(position), "%d", pw_impl_port_get_id(port));
|
||||
str = position;
|
||||
}
|
||||
if (direction == n->direction) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue