mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-28 06:46:42 -04:00
core: use %u format specifier for uint32_t IDs
The object, node, client, factory, module, and link IDs are all uint32_t values but were being formatted with %d. This would produce incorrect negative values if an ID ever exceeded INT_MAX
This commit is contained in:
parent
35cbd2e56a
commit
b4457b871f
26 changed files with 51 additions and 51 deletions
|
|
@ -430,9 +430,9 @@ static void *create_object(void *data,
|
|||
goto error_stream;
|
||||
}
|
||||
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%u",
|
||||
pw_impl_client_get_info(client)->id);
|
||||
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
|
||||
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%u",
|
||||
pw_impl_factory_get_info(d->factory)->id);
|
||||
|
||||
result = stream_new(pw_impl_client_get_context(client), impl_resource, properties);
|
||||
|
|
@ -498,7 +498,7 @@ static void module_registered(void *data)
|
|||
char id[16];
|
||||
int res;
|
||||
|
||||
snprintf(id, sizeof(id), "%d", pw_impl_module_get_info(module)->id);
|
||||
snprintf(id, sizeof(id), "%u", pw_impl_module_get_info(module)->id);
|
||||
items[0] = SPA_DICT_ITEM_INIT(PW_KEY_MODULE_ID, id);
|
||||
pw_impl_factory_update_properties(factory, &SPA_DICT_INIT(items, 1));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue