Skip to content

[th/uuid-generate-strv-null] fix nm_uuid_generate_from_strings() to support NULL strings

Thomas Haller requested to merge th/uuid-generate-strv-null into main

When you call

  nm_uuid_generate_from_strings_strv(uuid_type, type_arg, v1, v2);

you'd probably expect that both values are honored in some way. However, if v1 happened to be NULL, then v2 would have been ignored.

Extend nm_uuid_generate_from_strings() to accept also NULL values and pass on the length.

Also extend nm_uuid_generate_from_strings_strv() to take a length argument. It still accepts "-1" to take the input strv as a NULL terminated array.

The existing users of the previous behavior got renamed to nm_uuid_generate_from_strings_old().

Merge request reports