mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
acp: don't ignore return value
This commit is contained in:
parent
8b291ada27
commit
875236631f
1 changed files with 5 additions and 2 deletions
|
|
@ -134,15 +134,18 @@ static PA_PRINTF_FUNC(3,4) inline int pa_proplist_setf(pa_proplist *p, const cha
|
|||
{
|
||||
pa_proplist_item *item = pa_proplist_item_find(p, key);
|
||||
va_list args;
|
||||
int res;
|
||||
|
||||
va_start(args, format);
|
||||
if (item != NULL)
|
||||
pa_proplist_item_free(item);
|
||||
else
|
||||
item = pa_array_add(&p->array, sizeof(*item));
|
||||
item->key = strdup(key);
|
||||
vasprintf(&item->value, format, args);
|
||||
if ((res = vasprintf(&item->value, format, args)) < 0)
|
||||
res = -errno;
|
||||
va_end(args);
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline const char *pa_proplist_gets(const pa_proplist *p, const char *key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue