glib-aux: use nm_uuid_generate_random() helper

This commit is contained in:
Thomas Haller 2021-05-02 13:45:53 +02:00
parent b4608b3ff7
commit 7a15144f75
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 2 additions and 13 deletions

View file

@ -2857,7 +2857,7 @@ again:
if (!contents || !nm_uuid_parse(nm_strstrip(contents), &uuid)) {
/* generate a random UUID instead. */
is_fake = TRUE;
_nm_utils_uuid_generate_random(&uuid);
nm_uuid_generate_random(&uuid);
}
if (!g_once_init_enter(&lock))

View file

@ -3044,15 +3044,6 @@ _nm_utils_sriov_vf_from_strparts(const char *index,
/*****************************************************************************/
NMUuid *
_nm_utils_uuid_generate_random(NMUuid *out_uuid)
{
nm_assert(out_uuid);
uuid_generate_random(out_uuid->uuid);
return out_uuid;
}
gboolean
nm_utils_uuid_is_null(const NMUuid *uuid)
{
@ -3081,7 +3072,7 @@ nm_utils_uuid_generate_buf_(char *buf)
nm_assert(buf);
_nm_utils_uuid_generate_random(&uuid);
nm_uuid_generate_random(&uuid);
return nm_uuid_unparse(&uuid, buf);
}

View file

@ -352,8 +352,6 @@ gboolean _nm_utils_check_module_file(const char * name,
/*****************************************************************************/
NMUuid *_nm_utils_uuid_generate_random(NMUuid *out_uuid);
gboolean nm_utils_uuid_is_null(const NMUuid *uuid);
#define NM_UTILS_UUID_TYPE_LEGACY 0