mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-29 06:46:38 -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
|
|
@ -209,14 +209,14 @@ static void *create_object(void *_data,
|
|||
if (factory_name == NULL)
|
||||
goto error_properties;
|
||||
|
||||
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
|
||||
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%u",
|
||||
pw_global_get_id(pw_impl_factory_get_global(data->factory)));
|
||||
|
||||
linger = pw_properties_get_bool(properties, PW_KEY_OBJECT_LINGER, false);
|
||||
|
||||
client = resource ? pw_resource_get_client(resource) : NULL;
|
||||
if (client && !linger) {
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%u",
|
||||
pw_global_get_id(pw_impl_client_get_global(client)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue